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

consul_prepared_query doesn't support updating #662

Open
gmenuel opened this issue Jun 14, 2024 · 0 comments
Open

consul_prepared_query doesn't support updating #662

gmenuel opened this issue Jun 14, 2024 · 0 comments

Comments

@gmenuel
Copy link

gmenuel commented Jun 14, 2024

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 7.29.1
  • Ruby: 2.7.8p225
  • Distribution: Ubuntu 22.04
  • Module version: 8.1.0

How to reproduce (e.g Puppet code you use)

When running :

consul_prepared_query { 'consul':
  ensure               => 'present',
  service_name         => 'consul',
  service_failover_n   => 1,
  service_failover_dcs => [ 'dc1', 'dc2' ],
  service_only_passing => true,
  service_tags         => [ 'tag1', 'tag2' ],
  service_meta         => { 'version' => '1.2.3' },
  ttl                  => 10,
}

And then in another run, we change the service_failover_dcs (for exemple, I've seen the same behavior with other attributes) :

consul_prepared_query { 'consul':
  ensure               => 'present',
  service_name         => 'consul',
  service_failover_n   => 1,
  service_failover_dcs => [ 'dc1'],
  service_only_passing => true,
  service_tags         => [ 'tag1', 'tag2' ],
  service_meta         => { 'version' => '1.2.3' },
  ttl                  => 10,
}

What are you seeing

The prepared query is created during the first run, but not updated with the new attributes in the second run.

What behaviour did you expect instead

Changing attributes should be reflected in Consul.

Output log

Output of the second run:

Info: Applying configuration version '1718372736'
Debug: Prefetching default resources for consul_prepared_query
Debug: prefetching for consul
Debug: found {:name=>"consul", :id=>"a319fb62-d604-1a4d-e4b8-f54c6fbe448c", :token=>"", :service_failover_dcs=>["dc1", "dc2"], :ttl=>"10s", :service_only_passing=>false, :ensure=>:present}
Debug: Finishing transaction 12260
Debug: Storing state
Debug: Pruned old state cache entries in 0.00 seconds
Debug: Stored state in 0.00 seconds
Notice: Applied catalog in 0.02 seconds

Any additional information you'd like to impart

@gmenuel gmenuel changed the title consul_prepared_query does'nt support updating consul_prepared_query doesn't support updating Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant