Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx: OP940 prepare for downgrade #51

Merged
merged 1 commit into from
Oct 4, 2019
Merged

nginx: OP940 prepare for downgrade #51

merged 1 commit into from
Oct 4, 2019

Commits on Oct 4, 2019

  1. nginx: prepare for downgrade

    This adds a service which creates a directory needed in case the BMC is
    downgraded to a release which used nginx.
    The directory must be created in the overlay filesystem (not in the
    generated file system) so it will survive the downgrade.  The service
    is "harmless" and only creates one additional subdirectory.
    
    This is needed for OpenBMC 2.7 and later systems (which use BMCWeb) and
    may be code updated (downgraded) to OpenBMC 2.6 and earlier releases (which
    use nginx).
    
    Without this fix, the BMC fails to start its nginx server and does not
    provide HTTP, REST, or Web services.  The underlying cause of the server
    failing to start is: the directory it needs to write files into does not
    is not present.
    The problem does not affect the SSH service.  Commands like "systemctl
    status nginx" show messages about "unable to write 'random state'".
    The problem can be worked around by creating the /etc/ssl/certs/nginx/
    directory, then starting the service: systemctl start nginx
    
    This service can be removed in the first release that does not support a
    downgrade path to an OpenBMC 2.6 or earlier release.
    
    Tested on an OpenBMC 2.7 image:
      rm -r /etc/ssl/certs/nginx/   # cleanup workarounds
      code update to image which has this fix
      systemctl --no-pager list-units nginx-prep-downgrade.service
      systemctl status nginx-prep-downgrade.service
      ls /etc/ssl/certs/nginx
      The service successfully creates the directory.
    
    Fixes: openbmc/openbmc#3564
    
    Signed-off-by: Joseph Reynolds <jrey@linux.ibm.com>
    Change-Id: I32c3231fd877f5f5ea523d584d34892610b6cd0c
    Joseph Reynolds authored and Joseph Reynolds committed Oct 4, 2019
    Configuration menu
    Copy the full SHA
    fd76ae5 View commit details
    Browse the repository at this point in the history