Skip to content
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

Puppet-Agent 5.5.21 breakes baking process when configuring AEM #218

Closed
mbloch1986 opened this issue Jul 15, 2020 · 5 comments
Closed

Puppet-Agent 5.5.21 breakes baking process when configuring AEM #218

mbloch1986 opened this issue Jul 15, 2020 · 5 comments
Labels

Comments

@mbloch1986
Copy link
Contributor

Describe the bug
The new puppet agent version 5.5.21 released on the 14th of july(https://puppet.com/docs/puppet/5.5/release_notes.html#puppet-5521) is breaking the baking process when configuring AEM via swagger-aem.

To Reproduce

  1. trigger a regular baking process.
  2. Baking fails with following error message:
Notice: /Stage[main]/Aem_curator::Install_author/Aem_curator::Install_aem[author: Install AEM Author]/Aem_curator::Install_aem_profile[author: Install AEM profile aem65_sp1]/Aem_curator::Install_aem65_sp1[author: Install AEM profile aem65_sp1]/Aem_curator::Install_aem_package[author: Install service pack 1]/Exec[author: Wait post login page for aem-service-pkg]/returns: executed successfully
Notice: /Stage[main]/Aem_curator::Install_author/Aem_curator::Install_aem[author: Install AEM Author]/Aem_curator::Config_aem[author: Configure AEM]/Archive[/tmp/shinesolutions/packer-aem/author/aem.key]/ensure: download archive from file:///tmp/shinesolutions/packer-aem/certs/aem.key to /tmp/shinesolutions/packer-aem/author/aem.key  with cleanup
Notice: /Stage[main]/Aem_curator::Install_author/Aem_curator::Install_aem[author: Install AEM Author]/Aem_curator::Config_aem[author: Configure AEM]/Archive[/tmp/shinesolutions/packer-aem/author/aem.cert]/ensure: download archive from file:///tmp/shinesolutions/packer-aem/certs/aem.cert to /tmp/shinesolutions/packer-aem/author/aem.cert  with cleanup
Error: Could not set 'present' on ensure: invalid memory read at address=0x0000000000000000 (file: /tmp/shinesolutions/packer-aem/modules/aem_resources/manifests/create_system_users.pp, line: 31)
Error: Could not set 'present' on ensure: invalid memory read at address=0x0000000000000000 (file: /tmp/shinesolutions/packer-aem/modules/aem_resources/manifests/create_system_users.pp, line: 31)
Wrapped exception:
invalid memory read at address=0x0000000000000000
Error: /Stage[main]/Aem_curator::Install_author/Aem_curator::Install_aem[author: Install AEM Author]/Aem_curator::Config_aem[author: Configure AEM]/Aem_resources::Create_system_users[author: Create system users]/Aem_user[[author] Create user - orchestrator]/ensure: change from 'absent' to 'present' failed: Could not set 'present' on ensure: invalid memory read at address=0x0000000000000000 (file: /tmp/shinesolutions/packer-aem/modules/aem_resources/manifests/create_system_users.pp, line: 31)
Error: Could not set 'present' on ensure: invalid memory read at address=0x0000000000000000 (file: /tmp/shinesolutions/packer-aem/modules/aem_resources/manifests/create_system_users.pp, line: 31)
Error: Could not set 'present' on ensure: invalid memory read at address=0x0000000000000000 (file: /tmp/shinesolutions/packer-aem/modules/aem_resources/manifests/create_system_users.pp, line: 31)
Wrapped exception:
invalid memory read at address=0x0000000000000000
Error: /Stage[main]/Aem_curator::Install_author/Aem_curator::Install_aem[author: Install AEM Author]/Aem_curator::Config_aem[author: Configure AEM]/Aem_resources::Create_system_users[author: Create system users]/Aem_user[[author] Create user - replicator]/ensure: change from 'absent' to 'present' failed: Could not set 'present' on ensure: invalid memory read at address=0x0000000000000000 (file: /tmp/shinesolutions/packer-aem/modules/aem_resources/manifests/create_system_users.pp, line: 31)
Error: Could not set 'present' on ensure: invalid memory read at address=0x0000000000000000 (file: /tmp/shinesolutions/packer-aem/modules/aem_resources/manifests/create_system_users.pp, line: 31)
Error: Could not set 'present' on ensure: invalid memory read at address=0x0000000000000000 (file: /tmp/shinesolutions/packer-aem/modules/aem_resources/manifests/create_system_users.pp, line: 31)
Wrapped exception:
invalid memory read at address=0x0000000000000000
Error: /Stage[main]/Aem_curator::Install_author/Aem_curator::Install_aem[author: Install AEM Author]/Aem_curator::Config_aem[author: Configure AEM]/Aem_resources::Create_system_users[author: Create system users]/Aem_user[[author] Create user - deployer]/ensure: change from 'absent' to 'present' failed: Could not set 'present' on ensure: invalid memory read at address=0x0000000000000000 (file: /tmp/shinesolutions/packer-aem/modules/aem_resources/manifests/create_system_users.pp, line: 31)
Error: Could not set 'present' on ensure: invalid memory read at address=0x0000000000000000 (file: /tmp/shinesolutions/packer-aem/modules/aem_resources/manifests/create_system_users.pp, line: 31)
Error: Could not set 'present' on ensure: invalid memory read at address=0x0000000000000000 (file: /tmp/shinesolutions/packer-aem/modules/aem_resources/manifests/create_system_users.pp, line: 31)
Wrapped exception:
invalid memory read at address=0x0000000000000000
Error: /Stage[main]/Aem_curator::Install_author/Aem_curator::Install_aem[author: Install AEM Author]/Aem_curator::Config_aem[author: Configure AEM]/Aem_resources::Create_system_users[author: Create system users]/Aem_user[[author] Create user - exporter]/ensure: change from 'absent' to 'present' failed: Could not set 'present' on ensure: invalid memory read at address=0x0000000000000000 (file: /tmp/shinesolutions/packer-aem/modules/aem_resources/manifests/create_system_users.pp, line: 31)
Error: Could not set 'present' on ensure: invalid memory read at address=0x0000000000000000 (file: /tmp/shinesolutions/packer-aem/modules/aem_resources/manifests/create_system_users.pp, line: 31)
Error: Could not set 'present' on ensure: invalid memory read at address=0x0000000000000000 (file: /tmp/shinesolutions/packer-aem/modules/aem_resources/manifests/create_system_users.pp, line: 31)
Wrapped exception:
invalid memory read at address=0x0000000000000000
Error: /Stage[main]/Aem_curator::Install_author/Aem_curator::Install_aem[author: Install AEM Author]/Aem_curator::Config_aem[author: Configure AEM]/Aem_resources::Create_system_users[author: Create system users]/Aem_user[[author] Create user - importer]/ensure: change from 'absent' to 'present' failed: Could not set 'present' on ensure: invalid memory read at address=0x0000000000000000 (file: /tmp/shinesolutions/packer-aem/modules/aem_resources/manifests/create_system_users.pp, line: 31)
Notice: /Stage[main]/Aem_curator::Install_author/Aem_curator::Install_aem[author: Install AEM Author]/Aem_curator::Config_aem[author: Configure AEM]/Aem_node[author: Create AEM Password Reset Activator config node]: Dependency Aem_user[[author] Create user - orchestrator] has failures: true
Notice: /Stage[main]/Aem_curator::Install_author/Aem_curator::Install_aem[author: Install AEM Author]/Aem_curator::Config_aem[author: Configure AEM]/Aem_node[author: Create AEM Password Reset Activator config node]: Dependency Aem_user[[author] Create user - replicator] has failures: true
Notice: /Stage[main]/Aem_curator::Install_author/Aem_curator::Install_aem[author: Install AEM Author]/Aem_curator::Config_aem[author: Configure AEM]/Aem_node[author: Create AEM Password Reset Activator config node]: Dependency Aem_user[[author] Create user - deployer] has failures: true
Notice: /Stage[main]/Aem_curator::Install_author/Aem_curator::Install_aem[author: Install AEM Author]/Aem_curator::Config_aem[author: Configure AEM]/Aem_node[author: Create AEM Password Reset Activator config node]: Dependency Aem_user[[author] Create user - exporter] has failures: true
Notice: /Stage[main]/Aem_curator::Install_author/Aem_curator::Install_aem[author: Install AEM Author]/Aem_curator::Config_aem[author: Configure AEM]/Aem_node[author: Create AEM Password Reset Activator config node]: Dependency Aem_user[[author] Create user - importer] has failures: true
  1. uninstall puppet-agent 5.5.21
yum remove -y puppet-agent
  1. Install puppet-agent 5.5.20
yum -y install https://yum.puppetlabs.com/puppet5/el/7/x86_64/puppet-agent-5.5.20-1.el7.x86_64.rpm
  1. Trigger baking manually again and it is sucessfully

Expected behavior
Baking should pass

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information if relevant):

  • puppet-agent 5.5.21
  • OS rhel7 & AL2

Additional context
.

@mbloch1986 mbloch1986 added the bug label Jul 15, 2020
@mbloch1986
Copy link
Contributor Author

I'm currently trying to reproduce it on the CLI and I can see that the execution of the ruby_aem resource user fails even if I try it manually

[root@ip-10-0-15-190 packer-aem]# /opt/puppetlabs/puppet/bin/irb 
irb(main):001:0> 
irb(main):001:0> require 'ruby_aem'
irb(main):001:0> client = RubyAem::Aem.new
irb(main):001:0> user = client.user('/home/users/r','replicator')
irb(main):001:0> user.exists.data
irb(main):001:0> user.delete
FFI::NullPointerError: invalid memory read at address=0x0000000000000000
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/ffi-1.13.1/lib/ffi/pointer.rb:62:in `get_string'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/ffi-1.13.1/lib/ffi/pointer.rb:62:in `read_string'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/ethon-0.12.0/lib/ethon/easy.rb:287:in `escape'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/ethon-0.12.0/lib/ethon/easy/queryable.rb:35:in `block (2 levels) in to_s'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/ethon-0.12.0/lib/ethon/easy/queryable.rb:35:in `map'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/ethon-0.12.0/lib/ethon/easy/queryable.rb:35:in `block in to_s'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/ethon-0.12.0/lib/ethon/easy/queryable.rb:31:in `map'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/ethon-0.12.0/lib/ethon/easy/queryable.rb:31:in `to_s'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/ethon-0.12.0/lib/ethon/easy/http/actionable.rb:124:in `set_params'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/ethon-0.12.0/lib/ethon/easy/http/actionable.rb:106:in `setup'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/ethon-0.12.0/lib/ethon/easy/http/post.rb:16:in `setup'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/ethon-0.12.0/lib/ethon/easy/http.rb:39:in `http_request'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/easy_factory.rb:95:in `get'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/request/operations.rb:17:in `run'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/request/cacheable.rb:18:in `run'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/request/block_connection.rb:34:in `run'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/request/stubbable.rb:25:in `run'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/typhoeus-1.4.0/lib/typhoeus/request/before.rb:27:in `run'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/swagger_aem-3.3.0/lib/swagger_aem/api_client.rb:50:in `call_api'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/swagger_aem-3.3.0/lib/swagger_aem/api/sling_api.rb:1894:in `post_node_with_http_info'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/ruby_aem-3.8.0/lib/ruby_aem/client.rb:74:in `call'
	from /opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/gems/ruby_aem-3.8.0/lib/ruby_aem/resources/user.rb:50:in `delete'
	from (irb):5
	from /opt/puppetlabs/puppet/bin/irb:11:in `<main>'

This is working fine if Puppet-agent 5.5.20 is installed but fails if puppet-agent 5.5.21 is installed.

mbloch1986 added a commit to mbloch1986/packer-aem that referenced this issue Jul 16, 2020
### Changed
Lockdown puppet-agent version to 5.5.20 [shinesolutions#218]
mbloch1986 added a commit that referenced this issue Aug 6, 2020
…_version

Lockdown puppet-agent version to 5.5.20 [#218]
@mbloch1986
Copy link
Contributor Author

mbloch1986 commented Sep 23, 2020

Error still exists, tried to regenerate swagger-aem with different versions of openapitools/openapi-generator-cli but it didn't solve the problem, yet.

@mbloch1986
Copy link
Contributor Author

mbloch1986 commented Sep 23, 2020

Issue is also described here typhoeus/ethon#169

It seems like it has something to do that we are passing an empty value for the parameter delete_authorizable in ruby_aem
https://github.com/shinesolutions/ruby_aem/blob/master/conf/spec.yaml#L450

@mbloch1986
Copy link
Contributor Author

The reason of this error is described in shinesolutions/ruby_aem#38, which is that we are passing empty values to swagger-aem.

mbloch1986 added a commit to mbloch1986/packer-aem that referenced this issue Sep 27, 2020
* Upgrade `ruby_aem` to 3.10.0  [shinesolutions#218]
* Upgrade `puppet` to 5.5.21  [shinesolutions#218]
* Upgrade `aem_resources` to 7.2.0  [shinesolutions#218]
@mbloch1986
Copy link
Contributor Author

Fix included in master and will be released with the next release version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant