Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-1236

Provisioning of CentOS 7.3 VM can leave sshd in bad state

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.0.0
    • None
    • jclouds-scriptbuilder
    • None

    Description

      On provisioning CentOS 7.3, use of org.jclouds.scriptbuilder.statements.ssh.SshdConfig to call service sshd reload can (often) leave systemd in a bad state. It causes systemd to think that the process is "inactive (dead)".

      This code is called by org.jclouds.scriptbuilder.statements.login.AdminAccess when lockSsh is true (which is the default).

      For a lot more detail, see:

      A workaround in jclouds would be:

      -      Statement reloadSshdConfig = exec("hash service 2>&- && service ssh reload 2>&- || service sshd reload 2>&- || /etc/init.d/ssh* reload");
      +      Statement reloadSshdConfig = exec("( hash service 2>&- && ( service ssh reload || ( service sshd stop; service sshd start ) ) ) || /etc/init.d/ssh* reload");
      


      However, I'd hope that the CentOS/RHEL etc community will fix this in sshd and/or systemd. Once that is available, then hopefully service sshd reload will work (and is the right, clean thing to do).

      But even if that happens, there will likely still be a bunch of images in various clouds that have this bug.

      We could conclude that we live with the bug (perhaps mentioning it as a known issue in the release notes, or just via this bug report), and rely on it being fixed in a future CentOS version.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aled.sage Aled Sage
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: