Project

General

Profile

Bug #4328

'sshConfiguration' Technique v3.0: "SSH Port Configuration" returns "No answer" if disabled + typo

Added by Alex Tkachenko over 6 years ago. Updated over 6 years ago.

Status:
Released
Priority:
2
Category:
Techniques
Target version:
Severity:
User visibility:
Effort required:
Priority:

Description

There is a typo in the rudder_openssh_server_configuration_reporting methods section. It currently reads:

...
# When no port edition is defined
"any" 
usebundle  => rudder_common_report("${service_name}", "result_success", "${${params}[report]}", "SSH port configuration", "None", "The ${service_name} port configuration are not set for edition"),
ifvarclass => "${class_prefix}_ports_edit";
...

In this form, if no port configuration is requested, this results in "No Answer" response for the SSH Port Configuration section. I believe the intent was to use the negated class, i.e.

ifvarclass => "!${class_prefix}_ports_edit";

Also there is a typo in the message itself. I think it should read "The ${service_name} port configuration is not set for edition"

(discovered in rudder v 2.8.1; 2.9.1 seems to have the same issue).


Related issues

Related to Rudder - Bug #3975: OpenSSH v3 technique => no answerRejected2013-09-30Matthieu CERDAActions
#1

Updated by Jonathan CLARKE over 6 years ago

  • Status changed from New to In progress
  • Assignee set to Jonathan CLARKE
  • Priority changed from N/A to 2
  • Target version set to 2.7.7

Thanks for this bug report Alex, and thanks for the exact details which make this very easy to fix!

I'll create a Pull Request on GitHub to fix this.

#2

Updated by Jonathan CLARKE over 6 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Jonathan CLARKE to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/263

Done. Passing this over to Nicolas for a technical review before merging.

This fix will be released in the next 2.7.*, 2.8.* and 2.9.* releases, and will be in nightly builds the day after it is merged.

#3

Updated by Jonathan CLARKE over 6 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

Applied in changeset policy-templates:commit:a37c059efe465de1dcb76451068f3fbfdd86495b.

#4

Updated by Nicolas CHARLES over 6 years ago

Applied in changeset policy-templates:commit:5d9fad7e53dbcc3f9a34bcc20b8d2a6ae5d67216.

#5

Updated by Nicolas PERRON over 6 years ago

  • Status changed from Pending release to Discussion

I think that another typo has been inserted on the line 114. The comma after usebundle:

"any" usebundle => rudder_common_reports_generic("${service_name}", "${class_prefix}_ports", "${${params}[report]}", "SSH port configuration", "None", "The ${service_name} port configuration")
  ifvarclass => "${class_prefix}_ports_edit";

Should be:

"any" usebundle => rudder_common_reports_generic("${service_name}", "${class_prefix}_ports", "${${params}[report]}", "SSH port configuration", "None", "The ${service_name} port configuration"),
  ifvarclass => "${class_prefix}_ports_edit";

Do you agree ?

#6

Updated by Nicolas CHARLES over 6 years ago

Indeed, good catch.
I'm fixing it

#7

Updated by Nicolas CHARLES over 6 years ago

  • Status changed from Discussion to Pending technical review
  • Assignee changed from Nicolas CHARLES to Jonathan CLARKE
#8

Updated by Jonathan CLARKE over 6 years ago

  • Status changed from Pending technical review to Pending release
#9

Updated by Vincent MEMBRÉ over 6 years ago

  • Subject changed from A couple of typos in sshConfiguration/main.st (v3.0) to correct some typos is 'sshConfiguration' Technique v3.0
#10

Updated by Vincent MEMBRÉ over 6 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.7.7, which was released today.
Check out:

#11

Updated by Jonathan CLARKE over 6 years ago

  • Subject changed from correct some typos is 'sshConfiguration' Technique v3.0 to 'sshConfiguration' Technique v3.0: "SSH Port Configuration" returns "No answer" if disabled + typo

Renaming for clarity.

Also available in: Atom PDF