-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
peadm:convert fails with puppetlabs/node_manager v1.0.1 #469
Comments
Thanks for raising the issue! I'm looking into this now. |
Hey @bastelfreak, I've tried a few different variations of OS and PE versions along with your pe.conf, but haven't been able replicate the issue myself. Are you using the latest PEADM release? |
I will try to explain my environment and provide a way to replicate this. I installed PE 2019.8.12 by hand. my agent is running in the environment
My Puppetfile:
for the peadm module I'm referencing this branch: #465 My bolt-project.yaml: ---
analytics: false
name: peadmmig
modulepath:
- "/etc/puppetlabs/code/environments/peadm/modules"
- "/etc/puppetlabs/code/environments/peadm/site"
- "/opt/puppetlabs/puppet/modules"
stream: true
puppetdb:
server_urls:
- http://127.0.0.1:8080 After running the peadm::convert plan with node_manager 0.8.0 everything this fine:
Now I switch to to node_manager 1.0.1:
Now I purge the node group:
now running peadm again, it also works: https://gist.github.com/bastelfreak/5f75d165e3159594813cf9103542c22a my {
"puppet_enterprise::profile::master::code_manager_auto_configure": true,
"console_admin_password": "***",
"puppet_enterprise::puppet_master_host": "%{trusted.certname}",
"puppet_enterprise::send_analytics_data": false,
"pe_install::install::classification::pe_node_group_environment": "peadm",
"puppet_enterprise::master::recover_configuration::pe_environment": "peadm"
} This "minimal" example worked. I will try around to reproduce it |
okay another try! this time it failed.
dnf update -y --quiet; \
dnf install -y --quiet langpacks-de tar epel-release bash-completion vim jq git; \
dnf install -y --quiet htop ccze tree screen; \
dnf update -y --quiet then for PE, create /root/pe.conf: {
"puppet_enterprise::profile::master::r10k_remote": "https://github.com/bastelfreak/testcontrolrepo.git",
"puppet_enterprise::profile::master::code_manager_auto_configure": true,
"console_admin_password": "***",
"puppet_enterprise::puppet_master_host": "%{trusted.certname}"
} Install PE curl --silent --remote-header-name --location --remote-name 'https://pm.puppet.com/cgi-bin/download.cgi?dist=el&rel=8&arch=x86_64&ver=2019.8.12'
tar xf puppet-enterprise-*-x86_64.tar.gz
rm -f puppet-enterprise-*.tar.gz
cd puppet-enterprise-*-x86_64/
DISABLE_ANALYTICS=1 ./puppet-enterprise-installer -c ~/pe.conf -y
puppet agent -t
puppet agent -t
puppet agent -t
puppet access login --verbose --username admin --lifetime=4y
puppet code deploy peadm
inventory.yaml: ---
groups:
- name: primary
targets:
- name: puppet.local
uri: local://localhost bolt-project.yaml: ---
analytics: false
name: peadmmig
modulepath:
- "/etc/puppetlabs/code/environments/peadm/modules"
- "/etc/puppetlabs/code/environments/peadm/site"
- "/opt/puppetlabs/puppet/modules"
stream: true
puppetdb:
server_urls:
- http://127.0.0.1:8080 Then run the convert:
This fails for me with:
full output: https://gist.github.com/bastelfreak/fb42f9411a2f5221823ef6a42e360638 |
And when I run it a second time it passes: https://gist.github.com/bastelfreak/ae524a0064c9ad8e84570e28855ea3bb |
@ragingra I'm wondering if this is actually related to the changed environment and not the node_manager version. My customers don't have a production environment and they only deploy one environment, named after their team or product. In my above tests it's |
I want to point out that I'm able to reproduce this, as described in #469 (comment), but with the v3.21.0 release of PEADM. This issue isn't related to my feature branch from #465 |
Hi @bastelfreak, thank you for the extra detail. I was able to replicate the same error using your environment, and found that adding the wait flag to the code deploy seemed to fix the issue for me. |
I tried it again today with a fresh VM and I'm able to reproduce the problem, even with Modulelist:
full bolt output: https://gist.github.com/bastelfreak/1ae222ea9ab4cb388e725c37e81cb954. I'm wondering if this is somehow related to the empty production environment. the puppet_enterprise module is always available at
and modulepath is okay as well:
and production is empty because I don't deploy it and then puppet agent creates it:
I can even start bolt multiple times now and always get the same error: https://gist.github.com/bastelfreak/70cf3693342f8ce46e307f5fa13a5e6c I now added the environment to puppt.conf:
And now bolt passes: https://gist.github.com/bastelfreak/fdb7b0cbacaa1d2aad61a28f82b24b3b (but I don't know yet if that's a timing accident or an actual fix) |
I tried this on a new VM and added the environment to puppet.conf, but that also produces the same error. full output: https://gist.github.com/bastelfreak/25fe80e420537d8b60420914ef6d2161 Afterwards I run |
I was away for an hour, run bolt again, and this time it just worked. I guess this is a weird timing issue, but I'm not sure yet what would cause it. |
Hi @bastelfreak. I've created a ticket for this and have prioritised it for the team to work on as soon as possible. Thank you once again for your contributions! |
ohhhh I maybe found the problem: Flow
puppet_enterprise::master::code_manager::post_environment_hooks:
- url: "https://%{trusted.certname}:4433/classifier-api/v1/update-classes"
use-client-ssl: true
Root causePEADM always assumes that an production environment is present and I think that's a bug. Possible workaround 1Running PE nodes in a different environment is documented at https://www.puppet.com/docs/pe/2023.7/upgrade_pe#update_environment . Maybe PEADM should check if those values are set and then use that environment. Possible workaround 2An alternative could be that people that use a different environment have to update the environment for the Possible solutionWe talked a lot in the past about how Puppet Enterprise handles the modules in |
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in #469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
This checks if a user configured a environment in pe.conf. If that's the case, it will be used for the PEADM-specific node groups. Otherwise we fall back to production. This fixes a timing issue discovered in puppetlabs#469. In situations where the PE infra isn't running in production, we cannot assume that a production environment exists. And a node group can only reference classes from the environment the node group belongs to.
@GSPatton hi, do you have any info when https://github.com/puppetlabs/puppetlabs-peadm/tree/support-custom-environment could be merged & released? |
I raised support ticket 01286077 to get a release. |
Describe the Bug
I've a PE 2019.12.8 installation. With puppetlabs/node_manager v1.0.1 the peadm:convert doesn't work on a simple/empty PE installation. Used pe.conf:
This fails with:
It works with node_manager v0.8.0. I can also reproduce the issue by running the convert successfully with v0.8.0, then delete a node group that's managed by PEADM, for example
PE Primary B
. Then running the convert again it fails with above error.Expected Behavior
It's supposed to pass with node_manager v1.0.1 because that's listed in metadata.json.
Steps to Reproduce
Environment
Additional Context
The text was updated successfully, but these errors were encountered: