Coder Social home page Coder Social logo

Comments (4)

ekohl avatar ekohl commented on June 30, 2024

Yes, we worked around this in our installer using a hook combined with code here:

# In Puppet 7 the cadir was changed from $ssldir/ca to $puppetserver_dir/ca
# This migrates the directory if it was in the old location
# The migration command leaves a symlink in place
if versioncmp($puppet::server::real_puppetserver_version, '7.0') > 0 {
exec { 'migrate Puppetserver cadir':
command => "${puppet::puppetserver_cmd} ca migrate",
creates => $puppet::server::cadir,
onlyif => "test -d '${puppet::server::ssl_dir}/ca' && ! test -L '${puppet::server::ssl_dir}'",
path => $::path,
before => Exec['puppet_server_config-generate_ca_cert'],
}
}

I was a bit scared to automate too much here. For example, if the puppetserver is down, will the agent continue correctly? In our installer it's safe because it's essentially "just" a serverless Puppet agent run, but in complex environments it often isn't so clear.

I'd love to hear some more suggestions on how to deal with this.

from puppet-puppet.

jhoblitt avatar jhoblitt commented on June 30, 2024

I am trying to do the upgrade as part of a regular agent run, not using the foreman-installer, which means puppet is managing puppet. What I can state for sure is that as-is, this results in puppetserver breaking. I am not sure if solving that needs to be automated. I think the only way for this to work is for the puppetserver to be stopped during the agent run with the transition module. This should be acceptable as puppetserver doesn't generally need to be accessible by the agent after the catalog has been downloaded. I suppose it might result in the agent report being lost if the puppetserver is still down at the end of the agent run.

from puppet-puppet.

ekohl avatar ekohl commented on June 30, 2024

So you're advocating for something like:

transition { 'stop puppetserver service':
  resource   => Service['puppetserver'],
  attributes => { ensure => stopped },
  prior_to   => Exec['migrate Puppetserver cadir'],
}

We've used puppetlabs-transition in the past and I'd be ok with that. However, I am currently quite busy so I have little time to work it out. PRs are welcome.

from puppet-puppet.

ekohl avatar ekohl commented on June 30, 2024

In #873 we're dropping Puppet 6 support, including the migration. I don't think we're going to get to this anymore.

from puppet-puppet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.