#4178 The Bootup and Shutdown module does not recognize the OS

open
Jamie Cameron
5
2015-03-27
2012-12-23
Bodincus 2K
No

Upgrading from 1.60 breaks the module.

The module does not recognize the OS correctly, and consequently does not set the correct "Boot system".

In my case, all servers with CentOS 6.3 are correctly reporting that $os_type is redhat-linux, but this broken module is using the "Upstart" boot system, where CentOS - RedHat is SysV.
Apparently the variable $os_type is not used to determine the $config parameter in the module, and does not set the $init_mode to SysV.

I've attempted a debug, but the sheer number of passages the variables do is too convoluted for my time.

You sure know best where this chain breaks.

I suppose this is the pointer to the many problems reported with this module, where system configuration changes are not applied, module configuration changes don't change the visualization, and on some system it kills the system.

Please fix.

Discussion

  • Jamie Cameron
    Jamie Cameron
    2012-12-24

    CentOS 6 uses a mix of upstart and init.d bootup actions, so Webmin displays the boot type as upstart. However, you should still be able to start, stop and manage actions that use /etc/init.d scripts. Make sure you have at least version 1.610 though, as it fixed a few bugs in this mixed-mode setup.

     
  • Bodincus 2K
    Bodincus 2K
    2012-12-27

    CentOS 5

     
    Attachments
  • Bodincus 2K
    Bodincus 2K
    2012-12-27

    CentOS 6

     
    Attachments
  • Bodincus 2K
    Bodincus 2K
    2012-12-27

    Config

     
    Attachments
  • Bodincus 2K
    Bodincus 2K
    2012-12-27

    The module should not set the system as "Upstart" when it's then incapable of managing the SysV sequence of start-stop scripts (still present) or comply with its own configuration to display the main module page as I request.

    From the main module page, doesn't matter what I set in the module configuration, I can never see a detailed view of the levels the SysV scripts run, nor I can see the list of startup scripts in boot order.

    In the meantime, I'll attach two screenshots from two different systems (one running CentOS 5.x, another from a CentOS 6.x) to show you what I mean, and their configuration for this module.

    As you can see, it's extremely frustrating and inconvenient not to be able to see at a first glance the boot sequence and the init levels the scripts start and stop.

    I have 1.610 running on both, and I have even attempted to install the most recent build (1.63x) on the CentOS 6.x system, but the results are the same.

    While I understand that Upstart based systems are event-based, and there is nothing such as a "boot order" for Upstart, what this module should do is to manage "Bootup and Shutdown", that even in CentOS 6.x are still SysV - init.d based.

    Possibly, this module should spawn a new one, leaving only SysV management here and making a new one for the Upstart management.

    I leave this decision to you, but this is - from my POV - the best option for systems like CentOS and Fedora that still use a mixture of the two.

    Cheers

     
  • Jamie Cameron
    Jamie Cameron
    2012-12-27

    What I'll do as a quick fix is to allow the boot system to be manually selected, so if you want to force SysV init mode you will be able to on the Module Config page. I will also look into better support of mixed modes in the list of actions..

     
  • Bodincus 2K
    Bodincus 2K
    2012-12-28

    Hi Jamie,

    Thanks for the quick turnaround.

    I know it's difficult to deal with mixed init systems, I've been battling with the overcomplicated *buntu mixture of init structures since donkey's years.

    My opinion is that for the Bootup and Shutdown module to manage both modes at the same time could mean a very complicated interface, and an even more complex code behind it.

    That's why I'm suggesting to break it down into two - or indeed many - modules that are enabled on Webmin if necessary.

    Splitting the current code in different modules - or sub-modules - should be easy (I've dabbled in your module source code a bit to unsuccessfully try to debug...) as your code quality is excellent and well structured.

    But I'll leave this decisions to you, your excellent Webmin has saved my bacon a number of times and is a staple of my server installs.

    Thanks again for your time, looking forward to see the amended module in the next release - or indeed a patch for 1.610 to apply.

    Cheers

     
  • Jamie Cameron
    Jamie Cameron
    2012-12-28

    You can try out the 1.614 devel version from http://www.webmin.com/devel.html , which adds an option on the Module Config page to select a boot mode.

     
  • Bruce Wolfe
    Bruce Wolfe
    2013-04-11

    Seems that under Webmin v1.620 on Debian 6.0.7, I am getting the same behavior. I cannot change the "start at boot time" switch for any service that is already "off". Please advise.

     
  • Jamie Cameron
    Jamie Cameron
    2013-04-12

    @bmw2013 - which specific service are you unable to change the start at boot switch for?

     
  • Bruce Wolfe
    Bruce Wolfe
    2013-04-12

    Apache, Bind9 and Samba

     
  • Bruce Wolfe
    Bruce Wolfe
    2013-04-12

    What I did do was install BUM and performed the adjustments that way which is reflected in Webmin as it should. Chkconfig doesn't work in Debian, only RHEL/CentOS that I can tell. Please advise.

     
  • Jamie Cameron
    Jamie Cameron
    2013-04-12

    You might also want to try the latest dev version of Webmin from http://download.webmin.com/devel/deb/ - it should fix this issue.