What is the rationale to change the instance naming schema? Are you going to store all portions of an instance (tps, ca, etc.) in a single subdirectory now as opposed to multiple? Is there still going to be a symbolic link to files in /var? Rcritten 23:35, 17 November 2009 (UTC)
“Installation, upgrading, or removing the pki-setup package will do nothing to existing PKI instances.”
Nor should it create an instance, not sure if that’s what you meant or not. The pki-setup package should provide the tools to create an instance, it should not run anything by itself.
With respect to the pki-*-instance naming convention for files. I’m not a fan of embedding the instance data in multiple filenames, rather I would prefer to see the instance data collected under a subdirectory bearing the name of the instance or as a single file bearing the name of the instance in a xxx.d directory. Not only does this seem easier to manage but it’s more in keeping with existing practice. There is no packaging guideline you must follow with respect to this other than you must follow the guidelines of FHS (http://www.pathname.com/fhs), but making it easy to group files, locate them and conform to the expectations of existing practice has value.
It’s generally not a good idea to let user’s select where files will be created. Not only might this lead to violation of the FHS but it greatly confounds SELinux which applies security labels based on the pathname.
jdennis 13:40, 18 November 2009
Comment:
With respect to where the instance data is located, that’s what mount points are for. For example it would be a good administration practice to mount /var on a RAID device. As for what customers want vs. what customers get. One of our value propositions is consistency across the entire system. Major elements of that consistency and value proposition is FHS and SELinux.
I believe that the pki-*-instance naming convention is simply doing what Directory Server is doing, which is not embedding the same all over the place in many different files.
In DS, we have a static initscript that can operate against all existing DS instances on the system. The initscript knows what instances exist on the system by the existence of a “/etc/sysconfig/dirsrv-” file for each instance. This file simply contains a handful of PATH locations that are the bare minimum needed for the initscript to perform it’s start/stop/status operations. The “” portion of the name allows you to do things like “service dirsrv start myinstance”. The instance name is used in a few other locations as the directory name. It can not be simply one location sice we are following FHS standards, and not all instance files belong in the same location. For this reason we have locations such as “/etc/dirsrv/slapd-myinstance”, “/var/lib/dirsrv/slapd-myinstance”, and “/usr/lib/dirsrv/slapd-myinstance”.
My understanding is that CS would be doing the same thing here (Matt can correct me if I am wrong).
As for file locations, we are in the same boat with DS. The default is to follow FHS, and it is what is recommended. One can override certain key locations (database directory, log directory, etc.), but it is highly discouraged for the FHS and SELinux reasons mentioned.
Yes, I think this is a better idea. FWIW this is what I was trying to suggest when I talked about using subdirectories earlier rather than embedding the instance in a filename. This way you just iterate over the contents of the directory. So I agree, I think this is a better approach.
Jdennis 17:29, 19 November 2009 (UTC)
From an IRC discussion between RCritten and Mharmsen shortly after the meeting mentioned above:
\ `` mharmsen, ping. Sorry I missed the mtg, I think my questions were answered in the wiki discussion page
\ `` rcrit: pong --- so the only slightly "unresolved" question was about changing the mandatory options to "pkiremove"
\ `` ok, I saw mention to that, not sure what these options are
\ `` currently, they are the "location" and the "name"
\ `` I was thinking of adding a "subsystem type" option (and possibly deleting "location" as that information will now be contained in the registry)
\ `` Current usage: pkiremove -pki_instance_root=/var/lib -pki_instance_name=pki-ca1
\ `` Potential revised usage: pkiremove -pki_instance_name=pki-ca1 -subsystem_type=ca
\ `` ah
\ `` If I don't make the change, I can still use the old usage (I just have to read the pki subsystem type out of the instance's CS.cfg file),
\ `` as it would be using the new registry
\ `` the down side of this change is that I don't know how much this would disrupt IPA code
\ `` rcrit, do you have a strong preference one way or the other?
\ `` not really
\ `` my only concern is that registry's have a habit of getting corrupted, so you'll need to be careful :-)
\ `` okay -- if I make this change I will make every effort to notify you as soon as possible so that you can make any necessary IPA code changes.
Mharmsen 13:31, 19 November 2009 (PST)