Bug 507506

Summary: Make pkicreate observe an environment variable for the hostname (IPv6 only)
Product: [Retired] Dogtag Certificate System Reporter: Jack Magne <jmagne>
Component: Installer (pkicreate/pkiremove)Assignee: Matthew Harmsen <mharmsen>
Status: CLOSED ERRATA QA Contact: Chandrasekar Kannan <ckannan>
Severity: high Docs Contact:
Priority: high    
Version: 1.1CC: alee, benl
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-22 23:36:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 443788    
Attachments:
Description Flags
Addition of PKI_HOSTNAME environment variable
none
Addition of PKI_HOSTNAME environment variable (dogtag) none

Description Jack Magne 2009-06-23 03:12:13 UTC
Description of problem:


Right now, pkicreate makes use of system and custom routines to calculate the hostname of the CS instance about to be installed. For the purposes of IPV6, we want pkicreate to use the contents of the environment variable "PKI_HOSTNAME" as the host name. This would be entirely optional. In the case of a dual stack machine, the machines /etc/hosts file might have multiple entries, with one being for the IPv6 address. This variable gives us the option to have a CS instance installed using the IPv6 host name.

Comment 1 Matthew Harmsen 2009-06-24 23:20:39 UTC
Created attachment 349315 [details]
Addition of PKI_HOSTNAME environment variable

Comment 2 Matthew Harmsen 2009-06-24 23:21:15 UTC
Created attachment 349316 [details]
Addition of PKI_HOSTNAME environment variable (dogtag)

Comment 3 Jack Magne 2009-06-24 23:28:50 UTC
Attachments (id=349315) (id=349316) +jmagne.

Comment 4 Matthew Harmsen 2009-06-24 23:32:44 UTC
cd pki/base/setup

% svn stat
M      pkicommon

% svn commit
Sending        setup/pkicommon
Transmitting file data .
Committed revision 651.


cd pki/dogtag/setup

% svn stat
M      pki-setup.spec

% svn commit
Sending        setup/pki-setup.spec
Transmitting file data .
Committed revision 652.

Comment 5 Matthew Harmsen 2009-06-25 00:23:00 UTC
Added documentation blurb regarding this to "Bugzilla Bug #488653 -  Add IPv6 support to docs".

Comment 6 Kashyap Chamarthy 2009-07-04 13:10:19 UTC
Verified. CS.cfg observes the variable IPv6 hostname...
=============================

[root@bane logs]# cat /var/lib/pki-ca2/conf/CS.cfg | grep -i bane6
preop.securitydomain.admin_url=https://bane6.dsdev.sjc.redhat.com:9445
machineName=bane6.dsdev.sjc.redhat.com
service.machineName=bane6.dsdev.sjc.redhat.com
preop.cert.sslserver.dn=CN=bane6.dsdev.sjc.redhat.com
preop.name.sslDN=CN=bane6.dsdev.sjc.redhat.com
ca.Policy.rule.AuthInfoAccessExt.ad0_location=http://bane6.dsdev.sjc.redhat.com:8080/ocsp
[root@bane logs]# 
===============================

[root@bane ~]# tail /var/log/pki-ca2-install.log 
[2009-07-04 06:00:20] [debug] Setting selinux context pki_ca_port_t for 17744
[2009-07-04 06:00:24] [debug] Setting selinux context pki_ca_port_t for 17745
[2009-07-04 06:00:28] [debug] Setting 'pki-ca2' runlevel to '-'
[2009-07-04 06:00:28] [debug] Setting 'pki-ca2' start priority to '81'
[2009-07-04 06:00:28] [debug] Setting 'pki-ca2' stop priority to '19'
[2009-07-04 06:00:28] [debug] Registered 'pki-ca2' with '/sbin/chkconfig'.
[2009-07-04 06:00:34] [log] Configuration Wizard listening on
https://bane6.dsdev.sjc.redhat.com:17745/ca/admin/console/config/login?pin=nIMHxEI9OvRC6RSqZP74
[2009-07-04 06:00:34] [log] After configuration, the server can be operated by the command:
/sbin/service pki-ca2 start | stop | restart
[root@bane ~]# 
======================
[root@bane ~]# env 
HOSTNAME=bane.dsdev.sjc.redhat.com
PKI_HOSTNAME=bane6.dsdev.sjc.redhat.com
TERM=xterm
SHELL=/bin/bash
========================
[root@bane ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
10.14.1.129	bane.dsdev.sjc.redhat.com   bane
127.0.0.1	localhost.localdomain       localhost
::1		localhost6.localdomain6     localhost6
10.16.0.49	jennyv4.bos.redhat.com	    jennyv4
10.16.0.48	jennyv3.bos.redhat.com      jennyv3
3ffe:1111:2222:2000:250:45ff:fe02:81c6 	  bane6.dsdev.sjc.redhat.com
==============================