Don't package /etc/grid-security/certificates#90
Conversation
|
You should be consistent and remove the same from the debian packaging. This directory was added to the packaging not that long ago. It came from a change in the old GT project 26 Jul 2018, merged into GCT 11 Aug 2018. It was obviously added for a reason, so do we know if those reasons still apply? |
|
This is the commit that introduced the change: globus/globus-toolkit@28d6baa |
I tested this in a VM driven by CentOS 7: I precreated Does this constitute a problem? |
|
The issue seems to occur specifically when installing Then |
That |
|
Yeah, I suspect that's the case and this failure would also occur for any read-only FS. |
Most likely. But still, I wonder if it is the right way to try to adapt the RPM spec to environment specifics we can't know beforehand. I don't think it should be expected for a GNU/Linux distribution where packages are installed by copying their contents into place that |
Yeah, I agree but at the same time, packages should only own directories or files that they actually need. Does |
It seems the code does at least require it to exist: It checks a set of directories, including Requiring a directory to exist without owning it might be tricky. There is quite some guidance in https://docs.fedoraproject.org/en-US/packaging-guidelines/ see in particular File and Directory Ownership and File and Directory Dependencies, the latter stating: "Directory dependencies SHOULD ONLY be used to express the dependency on that directory existing, not on any other functionality of any other package that might provide that directory." |
|
I think it requires a cert directory to exist but it could be one of several others:
How useful is a cert directory if it doesn't have any certificates in it? |
That is indeed a fair question. A reason could be to prevent looking in |
|
Unfortunately I got no response from Joe Bester on that subject. |
Maybe that change was introduced to be in sync with what is checked internally by globus-gsi-sysconfig (1st paragraph of #90 (comment)). Other point: Let us assume SSH host public and private keys were stored in Now what? (1) Should the package maintainers remove the ownership of a default directory essential for operation of an OpenSSH deamon, or (2) should maybe the users of the OpenSSH daemon with the "special" configuration use configuration directives to reconfigure the location of the keys to the respective parts of their r/o dir? |
|
Well, OpenSSH only needs to create the keys if they don't already exist (and it has been asked to create them -- there's an AUTOCREATE_SERVER_KEYS option in the sysconfig). (I think LIGO uses GSI-OpenSSH without server keys at all.) To generalize, I think unless the software absolutely depends on that path and cannot be configured otherwise, it shouldn't fail to install if it cannot create that path. (Or at least a command-line flag to bypass it; yum/dnf don't have one but maybe |
The problem is setting FS permissions with
But for the SSH case for example you can also configure the daemon to use a configuration file or host keys from anywhere in the FS, so it actually doesn't absolutely depend on the default path ... (check the spec file in http://vault.centos.org/7.5.1804/os/Source/SPackages/openssh-7.4p1-16.el7.src.rpm for example). Hence I would consider that the baseline. |
|
I understand the reasoning, and I kind of agree that we probably should not install |
|
@matyasselmeci @ellert @brianhlin @msalle What's the actual purpose of the |
|
...also for Debian
Yes, it'd be good to know, why it was explicitly added.
I updated the Debian packaging accordingly.
+1 from me |
|
@bester |
|
The thing is, I don't think an empty /etc/grid-security/certificates directory is useful, and any RPM that installs certificates into that directory will necessarily create that directory as well. This addition hasn't done anything useful for OSG; instead, it has only caused problems. |
The latter would also not work for your configuration, as for you
I see your point, but still think it's a configuration issue. As an alternative approach, would it be feasible on your side to use a "link farm" instead, so not the See, I am a little afraid to merge this and make our new release, only to later find out, that we overlooked something that breaks things during installation for other sites or infrastructures than OSG. But maybe that's overly cautious. |
|
As much as I'd like to see this merged, I vote that we punt on this instead of having it hold up the release. |
|
Sure. |
382d3ad to
4fe5f28
Compare
|
@matyasselmeci @brianhlin @ellert @msalle What do you think? @matyasselmeci @brianhlin |
|
That plan works for me. The site in question found a workaround for the issue but AFAICT, the package is in the wrong here. |
ellert
left a comment
There was a problem hiding this comment.
I have no strong opinion either way. But there seems to be a majority in favour of the change.
|
Hi all, just to add I also have no strong opinion either way, so just go ahead. |
|
Ok, I'll merge this now and create a new tag. |
|
@matyasselmeci @brianhlin @ellert @msalle
It seems to be no problem for OpenSUSE Leap 15.0 (or In an earlier try, I had already installed a GridFTP server in this OpenSUSE driven VM, so the So it looks like |
|
This error is not related to that the /etc/grid-security/certificates directory is no longer installed by the globus-gsi-sysconfig package. The error is a consequence of the earlier error:
The hostname command fails, and the globus-simple-ca %post scriptlet does not check for this. therefore is interpreted as i.e. it tries to create a USER certificate request for the user with common name "-host" and save the request as a user certificate request in /root/.globus/usercert_request.pem (i.e. root's $HOME), instead of which would request a HOST certificate and save the request in /etc/grid-security/hostcert_request.pem. The next step then fails because /etc/grid-security/hostcert_request.pem does not exist. We could check for failing hostname command in the %post scriptlet I presume, i.e. instead of we could do We could also try to find out why the hostname command is failing. |
Yes, that's what I figured. My comment on that was more related to the fact, (1) that the
Ok, thanks for figuring that out. Last week I only confirmed that As the reason was a local misconfiguration, we can IMHO continue with the release of the GCT v6.2.20190906 and include the "fix" from PR #106 in the next release. |
There isn't much point to globus-gsi-sysconfig providing an empty /etc/grid-security/certificates directory, and putting it in the package causes problems for people that already have it, e.g. as a symlink to a shared filesystem.