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

empty profile subsystem path breaks idempotency #40

Open
naefhe opened this issue Jan 21, 2016 · 3 comments
Open

empty profile subsystem path breaks idempotency #40

naefhe opened this issue Jan 21, 2016 · 3 comments
Labels

Comments

@naefhe
Copy link

naefhe commented Jan 21, 2016

Hi

I'm having idempotency issues when attempting to add empty subsystem sections to a profile in JBoss domain mode. I reduced the manifest to the following minimal file, ran it and include the output of the first (and all subsequent) puppet agent -t runs.

Manifest weld.pp (there are hiera data objects not shown here; they are most likely not relevant):

$profile           = 'ha-p2p-tst4-ext'
$subsystem    = 'weld'
$ensure          = 'present'
$controller      = "localhost:9999"

include jboss::internal::prerequisites
include jboss::domain::controller
include jboss

jboss::clientry { "/profile=$profile/subsystem=$subsystem":
  ensure      => $ensure,
  controller  => $controller,
  profile     => $profile,
  runasdomain => true,
}

Output of puppet agent -t:

[root@jbossdc manifests]# puppet apply weld.pp
Warning: Scope(Class[Jboss::Internal::Compatibility]): Could not look up qualified variable 'jboss::internal::service::servicename'; class jboss::internal::service has not been evaluated
Warning: Scope(Class[Jboss::Internal::Compatibility]): Could not look up qualified variable 'jboss::internal::service::servicename'; class jboss::internal::service has not been evaluated
Warning: Scope(Class[Jboss::Internal::Compatibility]): Could not look up qualified variable 'jboss::internal::service::servicename'; class jboss::internal::service has not been evaluated
Warning: Scope(Class[Jboss::Internal::Compatibility]): Could not look up qualified variable 'jboss::internal::service::servicename'; class jboss::internal::service has not been evaluated
Warning: Scope(Class[Jboss::Internal::Compatibility]): Could not look up qualified variable 'jboss::internal::service::servicename'; class jboss::internal::service has not been evaluated
Warning: Scope(Class[Jboss::Internal::Compatibility]): Could not look up qualified variable 'jboss::internal::service::servicename'; class jboss::internal::service has not been evaluated
Notice: Compiled catalog for jbossdc.safeswisscloud.net in environment production in 0.93 seconds
Notice: /Stage[main]/Main/Jboss::Clientry[/profile=ha-p2p-tst4-ext/subsystem=weld]/Jboss_confignode[/profile=ha-p2p-tst4-ext/subsystem=weld]/ensure: ensure changed '' to 'present'
Notice: /Stage[main]/Jboss::Internal::Service/Service[jboss-eap]: Triggered 'refresh' from 1 events
Notice: /Stage[main]/Jboss::Internal::Service/Exec[jboss::service::test-running]: Triggered 'refresh' from 1 events
Notice: Applied catalog in 11.52 seconds

As you see, even though I specified ensure => 'present', jboss_confignode somehow ignores it, gets an undef/nil (or empty '') value and changes it to 'present', resulting in a trigger for the domain controller host controller service.

Furthermore, what is the cause of the warnings? Did I forget to include anything?

Thanks, and cheers,
Heinz

@cardil
Copy link
Collaborator

cardil commented Jan 21, 2016

I've edited your question for visibility @naefhe

@naefhe
Copy link
Author

naefhe commented Jan 21, 2016

Oh ... thank you!

@cardil
Copy link
Collaborator

cardil commented Jan 21, 2016

I've checked this. This must be a bug.

# cat jboss-issue-40.pp 
$profile     = 'ha'
$subsystem   = 'weld'

include jboss::domain::controller
class { 'jboss':
  product      => 'jboss-eap',
  version      => '6.4.0.GA',
  download_url => 'http://cdn.internal/jboss/jboss-eap-6.4.0.GA.zip',
  runasdomain  => true,
  profile      => $profile,
}

jboss::clientry { "/profile=$profile/subsystem=$subsystem":
  ensure     => 'present',
  # properties => {}, # adding `properties => {}` doesn't not help with the idempotenty issue
}

And the output is:

asciicast

@cardil cardil added this to the v1.0.4 - WildOpal milestone Jan 22, 2016
@cardil cardil modified the milestones: v1.0.4 - WildOpal, v1.1.0 - RiverBlue Mar 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants