Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-19247

[ModelViolationError] opensshconfigscanner actor fails when there are unexpected configuration settings

    • None
    • Moderate
    • rhel-sst-upgrades
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

      What were you trying to do that didn't work?

      https://access.redhat.com/solutions/6988802

      PermitRootLogin variable had a capital character in it

      https://access.redhat.com/solutions/7005564

      UsePrivilegeSeperation SANDBOX was all CAPS which leapp doesn't expect

      Expected results

      Leapp needs to better parse configuration files.

      If there is a problem ,we need a clear explanation of the problem

       

       

      Actual results

      PermitRootLogin variable had a capital character in it

      Traceback (most recent call last):
        File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
          self.run()
        File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
          self._target(*self._args, **self._kwargs)
        File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 72, in _do_run
          actor_instance.run(*args, **kwargs)
        File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 289, in run
          self.process(*args)
        File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/opensshconfigscanner/actor.py", line 28, in process
          readopensshconfig.scan_sshd(self.produce)
        File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/opensshconfigscanner/libraries/readopensshconfig.py", line 102, in scan_sshd
          config = parse_config(output)
        File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/opensshconfigscanner/libraries/readopensshconfig.py", line 42, in parse_config
          v = OpenSshPermitRootLogin(value=value, in_match=in_match)
        File "/usr/lib/python2.7/site-packages/leapp/models/__init__.py", line 90, in __init__
          getattr(defined_fields[field], init_method)(kwargs, field, self)
        File "/usr/lib/python2.7/site-packages/leapp/models/fields/__init__.py", line 111, in from_initialization
          self._validate_model_value(value=source_value, name=name)
        File "/usr/lib/python2.7/site-packages/leapp/models/fields/__init__.py", line 332, in _validate_model_value
          self._validate_choices(value, name)
        File "/usr/lib/python2.7/site-packages/leapp/models/fields/__init__.py", line 342, in _validate_choices
          'The value of "{name}" field must be one of "{values}"'.format(name=name, values=values))
      ModelViolationError: The value of "value" field must be one of "yes, prohibit-password, forced-commands-only, no"
       

      UsePrivilegeSeperation SANDBOX was all CAPS which leapp doesn't expect

      ====> * read_openssh_config
              Collect information about the OpenSSH configuration.
      Process Process-258:
      Traceback (most recent call last):
        File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
          self.run()
        File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
          self._target(*self._args, **self._kwargs)
        File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 72, in _do_run
          actor_instance.run(*args, **kwargs)
        File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 289, in run
          self.process(*args)
        File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/opensshconfigscanner/actor.py", line 28, in process
          readopensshconfig.scan_sshd(self.produce)
        File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/opensshconfigscanner/libraries/readopensshconfig.py", line 107, in scan_sshd
          produce_config(producer, config)
        File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/opensshconfigscanner/libraries/readopensshconfig.py", line 82, in produce_config
          producer(config)
        File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 313, in produce
          self._messaging.produce(model, self)
        File "/usr/lib/python2.7/site-packages/leapp/messaging/__init__.py", line 204, in produce
          return self._do_produce(model, actor, self._new_data)
        File "/usr/lib/python2.7/site-packages/leapp/messaging/__init__.py", line 222, in _do_produce
          data = json.dumps(model.dump(), sort_keys=True)
        File "/usr/lib/python2.7/site-packages/leapp/models/__init__.py", line 124, in dump
          type(self).fields[field].to_builtin(self, field, result)
        File "/usr/lib/python2.7/site-packages/leapp/models/fields/__init__.py", line 146, in to_builtin
          target[name] = self._convert_from_model(getattr(source, name, None), name=name)
        File "/usr/lib/python2.7/site-packages/leapp/models/fields/__init__.py", line 93, in _convert_from_model
          self._validate_model_value(value=value, name=name)
        File "/usr/lib/python2.7/site-packages/leapp/models/fields/__init__.py", line 332, in _validate_model_value
          self._validate_choices(value, name)
        File "/usr/lib/python2.7/site-packages/leapp/models/fields/__init__.py", line 342, in _validate_choices
          'The value of "{name}" field must be one of "{values}"'.format(name=name, values=values))
      ModelViolationError: The value of "use_privilege_separation" field must be one of "sandbox, yes, no"
       

       

              leapp-notifications leapp-notifications
              rhn-support-jcastran John Castranio
              leapp-notifications leapp-notifications
              RHEL Upgrades QE Team RHEL Upgrades QE Team
              Miriam Portman Miriam Portman
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: