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

cs_location always change on rocky8/9 #556

Open
teluq-pbrideau opened this issue Dec 13, 2024 · 0 comments · May be fixed by #557
Open

cs_location always change on rocky8/9 #556

teluq-pbrideau opened this issue Dec 13, 2024 · 0 comments · May be fixed by #557

Comments

@teluq-pbrideau
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 7
  • Ruby: 2.7.8p225
  • Distribution: Rocky8, Rocky9
  • Module version: master

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

The same code as described in the readme:

cs_location { 'vip-ping-connected':
  primitive => 'vip',
  rules     => [
    { 'vip-ping-exclude-rule' => {
        'score'      => '-INFINITY',
        'expression' => [
          { 'attribute' => 'pingd',
            'operation' => 'lt',
            'value'     => '100',
          },
        ],
      },
    },
    { 'vip-ping-prefer-rule' => {
        'score-attribute' => 'pingd',
        'expression'      => [
          { 'attribute' => 'pingd',
            'operation' => 'defined',
          }
        ],
      },
    },
  ],
}

What are you seeing

Puppet detect a change at every run. The change that is detected is the quote for the score-attribute:
'score-attribute' => '"pingd"', => 'score-attribute' => 'pingd',

What behaviour did you expect instead

Once configured, puppet should not detect a change everytime.

Output log

Notice: /Stage[main]/Profile::Vip/Cs_location[vip-ping-connected]/rules: rules changed [
  {
    'vip-ping-exclude-rule' => {
      'score' => '-INFINITY',
      'expression' => [
        {
          'operation' => 'lt',
          'attribute' => 'pingd',
          'value' => '100'
        }]
    }
  },
  {
    'vip-ping-prefer-rule' => {
      'score-attribute' => '"pingd"',
      'expression' => [
        {
          'operation' => 'defined',
          'attribute' => 'pingd'
        }]
    }
  }] to [
  {
    'vip-ping-exclude-rule' => {
      'score' => '-INFINITY',
      'expression' => [
        {
          'attribute' => 'pingd',
          'operation' => 'lt',
          'value' => '100'
        }]
    }
  },
  {
    'vip-ping-prefer-rule' => {
      'score-attribute' => 'pingd',
      'expression' => [
        {
          'attribute' => 'pingd',
          'operation' => 'defined'
        }]
    }
  }] (corrective)

Any additional information you'd like to impart

The fix is trivial, i’ll submit the PR right away

@teluq-pbrideau teluq-pbrideau linked a pull request Dec 13, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant