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

Introduce reboot* commands with DNF automatic

    • Icon: Bug Bug
    • Resolution: Can't Do
    • Icon: Normal Normal
    • None
    • rhel-8.8.0.z
    • dnf
    • Normal
    • FutureFeature
    • sst_cs_software_management
    • ssg_core_services
    • False
    • Hide

      None

      Show
      None
    • Red Hat Enterprise Linux
    • All

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

      Our customer would like to use the "reboot" or "reboot_command" options that are available upstream.

      Please provide the package NVR for which bug is seen:

      dnf-automatic-4.7.0-16.el8_8.noarch

      How reproducible:

      Always (no need to reproduce, see the notes)

      Expected results

      The system is rebooted when the config file contains

      reboot = when-changed

      Actual results

      No reboot.

       

      Notes

      Upstream main.py:

      173 class CommandsConfig(Config):
      174     def __init__(self):
      175         super(CommandsConfig, self).__init__()
      176         self.add_option('apply_updates', libdnf.conf.OptionBool(False))
      177         self.add_option('base_config_file', libdnf.conf.OptionString('/etc/dnf/dnf.conf'))
      178         self.add_option('download_updates', libdnf.conf.OptionBool(False))
      179         self.add_option('upgrade_type', libdnf.conf.OptionEnumString('default',
      180                         libdnf.conf.VectorString(['default', 'security'])))
      181         self.add_option('random_sleep', libdnf.conf.OptionNumberInt32(300))
      182         self.add_option('network_online_timeout', libdnf.conf.OptionNumberInt32(60))
      183         self.add_option('reboot', libdnf.conf.OptionEnumString('never',
      184                         libdnf.conf.VectorString(['never', 'when-changed', 'when-needed'])))
      185         self.add_option('reboot_command', libdnf.conf.OptionString(
      186             'shutdown -r +5 \'Rebooting after applying package updates\''))

      Downstream main.py:

      172 class CommandsConfig(Config):
      173     def __init__(self):
      174         super(CommandsConfig, self).__init__()
      175         self.add_option('apply_updates', libdnf.conf.OptionBool(False))
      176         self.add_option('base_config_file', libdnf.conf.OptionString('/etc/dnf/dnf.conf'))
      177         self.add_option('download_updates', libdnf.conf.OptionBool(False))
      178         self.add_option('upgrade_type', libdnf.conf.OptionEnumString('default',
      179                         libdnf.conf.VectorString(['default', 'security'])))
      180         self.add_option('random_sleep', libdnf.conf.OptionNumberInt32(300))
      181         self.add_option('network_online_timeout', libdnf.conf.OptionNumberInt32(60)) 
      

       

            packaging-team-maint packaging-team-maint
            rhn-support-cbesson Christophe Besson
            packaging-team-maint packaging-team-maint
            Software Management QE Software Management QE
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: