Re: [openstack-dev] Puppet debugging help?
On 19/06/18 01:59, Alex Schultz wrote: On Mon, Jun 18, 2018 at 9:13 AM, Lars Kellogg-Stedman wrote: Hey folks, I'm trying to patch puppet-keystone to support multi-valued configuration options (like trusted_dashboard). I have a patch that works, mostly, but I've run into a frustrating problem (frustrating because it would seem to be orthogonal to my patches, which affect the keystone_config provider and type). During the initial deploy, running tripleo::profile::base::keystone fails with: "Error: Could not set 'present' on ensure: undefined method `new' for nil:NilClass at /etc/puppet/modules/tripleo/manifests/profile/base/keystone.pp:274", It's likely erroring in the keystone_domain provider. https://github.com/openstack/puppet-keystone/blob/master/lib/puppet/provider/keystone_domain/openstack.rb#L115-L122 or https://github.com/openstack/puppet-keystone/blob/master/lib/puppet/provider/keystone_domain/openstack.rb#L155-L161 Providers are notoriously bad at their error messaging. Usually this error happens when we get a null back from the underlying command and we're still trying to do something. This could point to a misconfiguration of keystone if it's not getting anything back. Per Alex comment, the keystone_domain class is definitely involved. The provider fails: "Could not set 'present' on ensure" And the propagated error seems to be because the provider could not be set up for some dependent reason and came back empty. $ irb irb(main):001:0> nil.new NoMethodError: undefined method `new' for nil:NilClass The second pass worked because the missing "dependent" bit was set up (in the meantime) and the provider creation was satisfied. To investigate dependent cause within the provider, you could use 'notice("Value: ${variable}")' The line in question is: 70: if $step == 3 and $manage_domain { 71: if hiera('heat_engine_enabled', false) { 72: # create these seperate and don't use ::heat::keystone::domain since 73: # that class writes out the configs 74: keystone_domain { $heat_admin_domain: ensure => 'present', enabled => true } The thing is, despite the error...it creates the keystone domain *anyway*, and a subsequent run of the module will complete without any errors. I'm not entirely sure that the error is telling me, since *none* of the puppet types or providers have a "new" method as far as I can see. Any pointers you can offer would be appreciated. Thanks! -- Lars Kellogg-Stedman | larsks @ {irc,twitter,github} http://blog.oddbit.com/| __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev -- Gilles Dubreuil Senior Software Engineer - Red Hat - Openstack DFG Integration Email: gil...@redhat.com GitHub/IRC: gildub Mobile: +61 400 894 219 __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] Puppet debugging help?
On Mon, Jun 18, 2018 at 11:31:08AM -0400, Mohammed Naser wrote: > Hey Lars, > > Do you have a full job that's running which shows those issues? I don't. I have a local environment where I'm doing my testing. -- Lars Kellogg-Stedman | larsks @ {irc,twitter,github} http://blog.oddbit.com/| __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] Puppet debugging help?
On Mon, Jun 18, 2018 at 9:13 AM, Lars Kellogg-Stedman wrote: > Hey folks, > > I'm trying to patch puppet-keystone to support multi-valued > configuration options (like trusted_dashboard). I have a patch that > works, mostly, but I've run into a frustrating problem (frustrating > because it would seem to be orthogonal to my patches, which affect the > keystone_config provider and type). > > During the initial deploy, running tripleo::profile::base::keystone > fails with: > > "Error: Could not set 'present' on ensure: undefined method `new' > for nil:NilClass at > /etc/puppet/modules/tripleo/manifests/profile/base/keystone.pp:274", > It's likely erroring in the keystone_domain provider. https://github.com/openstack/puppet-keystone/blob/master/lib/puppet/provider/keystone_domain/openstack.rb#L115-L122 or https://github.com/openstack/puppet-keystone/blob/master/lib/puppet/provider/keystone_domain/openstack.rb#L155-L161 Providers are notoriously bad at their error messaging. Usually this error happens when we get a null back from the underlying command and we're still trying to do something. This could point to a misconfiguration of keystone if it's not getting anything back. > The line in question is: > > 70: if $step == 3 and $manage_domain { > 71: if hiera('heat_engine_enabled', false) { > 72: # create these seperate and don't use ::heat::keystone::domain since > 73: # that class writes out the configs > 74: keystone_domain { $heat_admin_domain: > ensure => 'present', > enabled => true > } > > The thing is, despite the error...it creates the keystone domain > *anyway*, and a subsequent run of the module will complete without any > errors. > > I'm not entirely sure that the error is telling me, since *none* of > the puppet types or providers have a "new" method as far as I can see. > Any pointers you can offer would be appreciated. > > Thanks! > > -- > Lars Kellogg-Stedman | larsks @ {irc,twitter,github} > http://blog.oddbit.com/| > > __ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] Puppet debugging help?
Hey Lars, Do you have a full job that's running which shows those issues? Thanks, Mohammed On Mon, Jun 18, 2018 at 11:13 AM, Lars Kellogg-Stedman wrote: > Hey folks, > > I'm trying to patch puppet-keystone to support multi-valued > configuration options (like trusted_dashboard). I have a patch that > works, mostly, but I've run into a frustrating problem (frustrating > because it would seem to be orthogonal to my patches, which affect the > keystone_config provider and type). > > During the initial deploy, running tripleo::profile::base::keystone > fails with: > > "Error: Could not set 'present' on ensure: undefined method `new' > for nil:NilClass at > /etc/puppet/modules/tripleo/manifests/profile/base/keystone.pp:274", > > The line in question is: > > 70: if $step == 3 and $manage_domain { > 71: if hiera('heat_engine_enabled', false) { > 72: # create these seperate and don't use ::heat::keystone::domain since > 73: # that class writes out the configs > 74: keystone_domain { $heat_admin_domain: > ensure => 'present', > enabled => true > } > > The thing is, despite the error...it creates the keystone domain > *anyway*, and a subsequent run of the module will complete without any > errors. > > I'm not entirely sure that the error is telling me, since *none* of > the puppet types or providers have a "new" method as far as I can see. > Any pointers you can offer would be appreciated. > > Thanks! > > -- > Lars Kellogg-Stedman | larsks @ {irc,twitter,github} > http://blog.oddbit.com/| > > __ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev -- Mohammed Naser — vexxhost - D. 514-316-8872 D. 800-910-1726 ext. 200 E. mna...@vexxhost.com W. http://vexxhost.com __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
[openstack-dev] Puppet debugging help?
Hey folks, I'm trying to patch puppet-keystone to support multi-valued configuration options (like trusted_dashboard). I have a patch that works, mostly, but I've run into a frustrating problem (frustrating because it would seem to be orthogonal to my patches, which affect the keystone_config provider and type). During the initial deploy, running tripleo::profile::base::keystone fails with: "Error: Could not set 'present' on ensure: undefined method `new' for nil:NilClass at /etc/puppet/modules/tripleo/manifests/profile/base/keystone.pp:274", The line in question is: 70: if $step == 3 and $manage_domain { 71: if hiera('heat_engine_enabled', false) { 72: # create these seperate and don't use ::heat::keystone::domain since 73: # that class writes out the configs 74: keystone_domain { $heat_admin_domain: ensure => 'present', enabled => true } The thing is, despite the error...it creates the keystone domain *anyway*, and a subsequent run of the module will complete without any errors. I'm not entirely sure that the error is telling me, since *none* of the puppet types or providers have a "new" method as far as I can see. Any pointers you can offer would be appreciated. Thanks! -- Lars Kellogg-Stedman | larsks @ {irc,twitter,github} http://blog.oddbit.com/| __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev