Project

General

Profile

Actions

Bug #3758

closed

Technique "OpenSSH Server" v3.0: it does not correctly edit ssh ports on systems other than RHEL/SLES

Added by Vincent MEMBRÉ over 11 years ago. Updated over 9 years ago.

Status:
Released
Priority:
1 (highest)
Category:
Techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

When using latest ssh configuration technique (3.0), ports are not correctly configured.

variable {this.rudder_openssh_server_config_ports} is not expanded which leads to having ports value to {this.rudder_openssh_server_config_ports}

here is the variable definition :

      "rudder_openssh_server_config_ports" 
        slist => { "@{${params}[sshd_config_ports]}" };

and its application

    (debian|redhat|SuSE).rudder_openssh_server_ports_edit::
      "${${params}[sshd_config_file]}" 
        edit_line => rudder_openssh_server_port_configuration("@{this.rudder_openssh_server_config_ports}"),
        classes   => rudder_common_classes("${class_prefix}_ports"),
        comment   => "Edit the OpenSSH listening ports in the configuration file";

Actions #1

Updated by Nicolas PERRON over 11 years ago

  • Target version changed from 2.7.0~beta1 to 2.7.0~rc1
Actions #2

Updated by Nicolas PERRON over 11 years ago

  • Target version changed from 2.7.0~rc1 to 2.7.0
Actions #3

Updated by Jonathan CLARKE over 11 years ago

I cannot reproduce this using Rudder 2.7, it works just fine.

Actions #4

Updated by Jonathan CLARKE over 11 years ago

  • Assignee set to Vincent MEMBRÉ

Vincent, can you test again see if you reproduce this? I really can't.

Actions #5

Updated by Jonathan CLARKE over 11 years ago

  • Subject changed from sshConfiguration 3.0 does not correctly edit ssh ports to sshConfiguration 3.0 does not correctly edit ssh ports on systems other than RHEL/SLES
  • Status changed from New to 8
  • Assignee changed from Vincent MEMBRÉ to Jonathan CLARKE

OK, we figured it out, this doesn't happen on SLES/RHEL/CentOS systems, which is where I was testing.

This is due to a missing class expression:

    (SuSE|redhat)::
      "rudder_openssh_server_startup_init_name" 
        string => "/etc/init.d/sshd";
      "rudder_openssh_server_startup_init_activation_command" 
        string => "/sbin/chkconfig --del sshd \&\& /sbin/chkconfig --add sshd";

      # Copy the list of Ports in the local bundle
      # This is mandatory because we cannot use remote slist in CFEngine 3.2
      "rudder_openssh_server_config_ports" 
        slist => { "@{${params}[sshd_config_ports]}" };

This second block ("Copy the list of Ports in the local bundle") should be in class "any".

Actions #6

Updated by Jonathan CLARKE over 11 years ago

  • Status changed from 8 to Pending technical review
  • Assignee changed from Jonathan CLARKE to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/158
Actions #7

Updated by Jonathan CLARKE over 11 years ago

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

Applied in changeset commit:a384ba3aafca4ef7b357365e809317d49dd295bf.

Actions #8

Updated by Nicolas CHARLES over 11 years ago

Applied in changeset commit:84df619b805593900bf6f7107099150572a3acc9.

Actions #9

Updated by Nicolas PERRON over 11 years ago

  • Subject changed from sshConfiguration 3.0 does not correctly edit ssh ports on systems other than RHEL/SLES to Technique "OpenSSH Server" v3.0: it does not correctly edit ssh ports on systems other than RHEL/SLES
Actions #10

Updated by Nicolas PERRON over 11 years ago

  • Status changed from Pending release to Released
Actions #11

Updated by Nicolas PERRON over 11 years ago

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

Actions #12

Updated by Benoît PECCATTE over 9 years ago

  • Project changed from 24 to Rudder
  • Category changed from Techniques to Techniques
Actions

Also available in: Atom PDF