Closed mbloch1986 closed 4 years ago
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.
Error still exists, tried to regenerate swagger-aem with different versions of openapitools/openapi-generator-cli
but it didn't solve the problem, yet.
Issue is also described here https://github.com/typhoeus/ethon/issues/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
The reason of this error is described in https://github.com/shinesolutions/ruby_aem/issues/38, which is that we are passing empty values to swagger-aem.
Fix included in master and will be released with the next release version.
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
Expected behavior Baking should pass
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information if relevant):
Additional context .