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

Apache needs hostname set to "ood" #1

Open
vsoch opened this issue Jun 25, 2019 · 10 comments
Open

Apache needs hostname set to "ood" #1

vsoch opened this issue Jun 25, 2019 · 10 comments

Comments

@vsoch
Copy link
Owner

vsoch commented Jun 25, 2019

I figured it would be in the portal configuration file, but setting:

servername: ood

Didn't seem to do anything. So we need a solution to this message - specifically, where is the apache.conf file (it's not in the traditional spot) and then what's the best way to change it.

ood          | AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.19.0.7. Set the 'ServerName' directive globally to suppress this message
@ericfranz
Copy link

Since OnDemand uses Software Collections for Apache the generated config is at /opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf. Unfortunately, OnDemand uses a "poor man's Puppet" where after modifying the /etc/ood/config/ood-portal.yml file you have to run a script to re-generate the /opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf. You can do that by executing sudo /opt/ood/ood-portal-generator/sbin/update_ood_portal after modifying the ood-portal.yml file.

@vsoch
Copy link
Owner Author

vsoch commented Jun 25, 2019

Ah ok, so what modification do I need to do exactly?

@ericfranz
Copy link

It does indeed look like if you would execute sudo /opt/ood/ood-portal-generator/sbin/update_ood_portal after making the modification to the yaml config like you tried (servername: ood) you should get the result you want. See https://github.com/OSC/ondemand/blob/b16c43a6173644c5bc8dd4183bb785e1f379f01b/ood-portal-generator/templates/ood-portal.conf.erb#L62-L64

@ericfranz
Copy link

If you aren't going to modify the Apache config ood-portal.conf directly, I wonder what the ramifications would be in executing /opt/ood/ood-portal-generator/sbin/update_ood_portal during the startup of Apache. That way you would always have the latest version of the config "generated" based on the yml file, and would only need to restart Apache if the config changed... I haven't actually tried that though.

@vsoch
Copy link
Owner Author

vsoch commented Jun 25, 2019

Hmm I'm not sure if something has changed, but I'm getting an error that the package isn't signed:

warning: /var/cache/yum/x86_64/7/centos-sclo-rh/packages/httpd24-httpd-2.4.34-7.el7.1.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f2ee9d55: NOKEY
Public key for httpd24-httpd-2.4.34-7.el7.1.x86_64.rpm is not installed
warning: /var/cache/yum/x86_64/7/ondemand-web/packages/ondemand-apache-1.6-1.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 92d31755: NOKEY
Public key for ondemand-apache-1.6-1.el7.x86_64.rpm is not installed
--------------------------------------------------------------------------------
Total                                               13 MB/s | 233 MB  00:17     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
Importing GPG key 0xF2EE9D55:
 Userid     : "CentOS SoftwareCollections SIG (https://wiki.centos.org/SpecialInterestGroup/SCLo) <security@centos.org>"
 Fingerprint: c4db d535 b1fb ba14 f8ba 64a8 4eb8 4e71 f2ee 9d55
 Package    : centos-release-scl-rh-2-3.el7.centos.noarch (@extras)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ondemand
Importing GPG key 0x92D31755:
 Userid     : "OnDemand Release Signing Key <packages@osc.edu>"
 Fingerprint: fe14 3ea1 cb37 8b56 9bbf 7c54 4b72 fe2b 92d3 1755
 Package    : ondemand-release-web-latest-1-2.el7.noarch (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-ondemand


Package ondemand-1.6.6-1.el7.x86_64.rpm is not signed

@vsoch
Copy link
Owner Author

vsoch commented Jun 25, 2019

I'm not sure what has changed (nothing afaik) but should I use a different one? https://yum.osc.edu/ondemand/latest/

@vsoch
Copy link
Owner Author

vsoch commented Jun 25, 2019

I'll just use --nogpgcheck for now.

@ericfranz
Copy link

I think my colleague recently built a new rpm for 1.6 built failed to properly sign it and is in the process of fixing that - this might be the error you saw. Though the rpm you are using I think is the final release candidate for 1.6, we need to upload a properly signed rpm.

FWIW https://yum.osc.edu/ondemand/latest/ is what we use at OSC, but of course its less stable because its easier for us to push out a quick fix to respond to OSC user feedback. https://yum.osc.edu/ondemand/1.6/ will eventually have a copy of the stable signed release though it doesn't yet (it has 1.6.1 and I dont recall the state of that). Most sites have https://yum.osc.edu/ondemand/1.5/ installed right now.

@vsoch
Copy link
Owner Author

vsoch commented Jun 25, 2019

Okay cool, thanks for the details!

I did get the server name to update, but of course using the docker hostname (and having it switch on my host) doesn't work. I'd need to identify ood as a hostname on my host too, which is probably harder than just getting the ip address from the log. So until there is a better solution, I'm going to leave it commented out.

I'm building on the base container recipe for the VNC dependencies for the nodes, for interactive apps. This is where it will likely get tricky... we'll see!

@ericfranz
Copy link

Good luck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants