Bug 1469034 - The atomic-openshift-master creates and ships /etc/origin/master but ships / creates %ghost /etc/origin/* files
The atomic-openshift-master creates and ships /etc/origin/master but ships / ...
Status: POST
Product: OpenShift Container Platform
Classification: Red Hat
Component: Release (Show other bugs)
unspecified
Unspecified Unspecified
medium Severity medium
: ---
: 3.6.z
Assigned To: Steve Milner
Wei Sun
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-10 06:16 EDT by Jan Pazdziora
Modified: 2017-07-12 14:55 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Pazdziora 2017-07-10 06:16:31 EDT
Description of problem:

After installing atomic-openshift-master, /etc/origin only contains

-rw-r--r--.  1 root root   58 Jul 10 05:08 .config_managed
drwx------.  2 root root 4096 Jul 10 05:08 master
drwx------.  2 root root  209 Jun  5 22:45 node

with a lot of non-rpm-owned files in /etc/origin/master, while rpm -ql atomic-openshift-master lists a lot of files directly in /etc/origin but those do not exist.

Version-Release number of selected component (if applicable):

atomic-openshift-master-3.6.96-1.git.0.381dd63.el7.x86_64

How reproducible:

Deterministic.

Steps to Reproduce:
1. yum install atomic-openshift-master
2. ls -la /etc/origin
3. ls -la /etc/origin/master
4. rpm -ql atomic-openshift-master

Actual results:

# ls -la /etc/origin
total 20
drwxr-xr-x.  4 root root   55 Jul 10 15:14 .
drwxr-xr-x. 82 root root 8192 Jul 10 15:14 ..
-rw-r--r--.  1 root root   58 Jul 10 15:14 .config_managed
drwx------.  2 root root 4096 Jul 10 15:14 master
drwxr-xr-x.  2 root root  209 Jul 10 15:14 node

# ls -la /etc/origin/master
total 404
drwx------. 2 root root   4096 Jul 10 15:14 .
drwxr-xr-x. 4 root root     55 Jul 10 15:14 ..
-rw-r--r--. 1 root root   1119 Jul 10 15:14 admin.crt
-rw-------. 1 root root   1679 Jul 10 15:14 admin.key
-rw-------. 1 root root   5654 Jul 10 15:14 admin.kubeconfig
-rw-r--r--. 1 root root   1070 Jul 10 15:14 ca-bundle.crt
-rw-r--r--. 1 root root   1070 Jul 10 15:14 ca.crt
-rw-------. 1 root root   1679 Jul 10 15:14 ca.key
-rw-r--r--. 1 root root      2 Jul 10 15:14 ca.serial.txt
-rw-r--r--. 1 root root   2514 Jul 10 15:14 etcd.server.crt
-rw-------. 1 root root   1675 Jul 10 15:14 etcd.server.key
-rw-r--r--. 1 root root   6291 Jul 10 15:14 master-config.yaml
-rw-r--r--. 1 root root   1078 Jul 10 15:14 master.etcd-client.crt
-rw-------. 1 root root   1675 Jul 10 15:14 master.etcd-client.key
-rw-r--r--. 1 root root   1135 Jul 10 15:14 master.kubelet-client.crt
-rw-------. 1 root root   1675 Jul 10 15:14 master.kubelet-client.key
-rw-r--r--. 1 root root   1086 Jul 10 15:14 master.proxy-client.crt
-rw-------. 1 root root   1679 Jul 10 15:14 master.proxy-client.key
-rw-r--r--. 1 root root   2514 Jul 10 15:14 master.server.crt
-rw-------. 1 root root   1675 Jul 10 15:14 master.server.key
-rw-r--r--. 1 root root   1123 Jul 10 15:14 openshift-master.crt
-rw-------. 1 root root   1675 Jul 10 15:14 openshift-master.key
-rw-------. 1 root root   5702 Jul 10 15:14 openshift-master.kubeconfig
-rw-r--r--. 1 root root 291505 Jul 10 15:14 policy.json
-rw-------. 1 root root   1679 Jul 10 15:14 serviceaccounts.private.key
-rw-------. 1 root root    451 Jul 10 15:14 serviceaccounts.public.key
-rw-r--r--. 1 root root   1115 Jul 10 15:14 service-signer.crt
-rw-------. 1 root root   1675 Jul 10 15:14 service-signer.key

# rpm -ql atomic-openshift-master
/etc/origin/.config_managed
/etc/origin/admin.crt
/etc/origin/admin.key
/etc/origin/admin.kubeconfig
/etc/origin/ca.crt
/etc/origin/ca.key
/etc/origin/ca.serial.txt
/etc/origin/etcd.server.crt
/etc/origin/etcd.server.key
/etc/origin/master
/etc/origin/master-config.yaml
/etc/origin/master.etcd-client.crt
/etc/origin/master.etcd-client.key
/etc/origin/master.kubelet-client.crt
/etc/origin/master.kubelet-client.key
/etc/origin/master.server.crt
/etc/origin/master.server.key
/etc/origin/openshift-master.crt
/etc/origin/openshift-master.key
/etc/origin/openshift-master.kubeconfig
/etc/origin/openshift-registry.crt
/etc/origin/openshift-registry.key
/etc/origin/openshift-registry.kubeconfig
/etc/origin/openshift-router.crt
/etc/origin/openshift-router.key
/etc/origin/openshift-router.kubeconfig
/etc/origin/policy.json
/etc/origin/serviceaccounts.private.key
/etc/origin/serviceaccounts.public.key
/etc/sysconfig/atomic-openshift-master
/usr/lib/systemd/system/atomic-openshift-master.service
/usr/share/atomic-openshift/migration
/usr/share/atomic-openshift/migration/fix-3.4-paths.sh
/usr/share/atomic-openshift/migration/migrate-image-manifests.sh

Expected results:

# ls -la /etc/origin
total 20
drwxr-xr-x.  4 root root   55 Jul 10 15:14 .
drwxr-xr-x. 82 root root 8192 Jul 10 15:14 ..
-rw-r--r--.  1 root root   58 Jul 10 15:14 .config_managed
drwx------.  2 root root 4096 Jul 10 15:14 master
drwxr-xr-x.  2 root root  209 Jul 10 15:14 node

# ls -la /etc/origin/master
total 404
drwx------. 2 root root   4096 Jul 10 15:14 .
drwxr-xr-x. 4 root root     55 Jul 10 15:14 ..
-rw-r--r--. 1 root root   1119 Jul 10 15:14 admin.crt
-rw-------. 1 root root   1679 Jul 10 15:14 admin.key
-rw-------. 1 root root   5654 Jul 10 15:14 admin.kubeconfig
-rw-r--r--. 1 root root   1070 Jul 10 15:14 ca-bundle.crt
-rw-r--r--. 1 root root   1070 Jul 10 15:14 ca.crt
-rw-------. 1 root root   1679 Jul 10 15:14 ca.key
-rw-r--r--. 1 root root      2 Jul 10 15:14 ca.serial.txt
-rw-r--r--. 1 root root   2514 Jul 10 15:14 etcd.server.crt
-rw-------. 1 root root   1675 Jul 10 15:14 etcd.server.key
-rw-r--r--. 1 root root   6291 Jul 10 15:14 master-config.yaml
-rw-r--r--. 1 root root   1078 Jul 10 15:14 master.etcd-client.crt
-rw-------. 1 root root   1675 Jul 10 15:14 master.etcd-client.key
-rw-r--r--. 1 root root   1135 Jul 10 15:14 master.kubelet-client.crt
-rw-------. 1 root root   1675 Jul 10 15:14 master.kubelet-client.key
-rw-r--r--. 1 root root   1086 Jul 10 15:14 master.proxy-client.crt
-rw-------. 1 root root   1679 Jul 10 15:14 master.proxy-client.key
-rw-r--r--. 1 root root   2514 Jul 10 15:14 master.server.crt
-rw-------. 1 root root   1675 Jul 10 15:14 master.server.key
-rw-r--r--. 1 root root   1123 Jul 10 15:14 openshift-master.crt
-rw-------. 1 root root   1675 Jul 10 15:14 openshift-master.key
-rw-------. 1 root root   5702 Jul 10 15:14 openshift-master.kubeconfig
-rw-r--r--. 1 root root 291505 Jul 10 15:14 policy.json
-rw-------. 1 root root   1679 Jul 10 15:14 serviceaccounts.private.key
-rw-------. 1 root root    451 Jul 10 15:14 serviceaccounts.public.key
-rw-r--r--. 1 root root   1115 Jul 10 15:14 service-signer.crt
-rw-------. 1 root root   1675 Jul 10 15:14 service-signer.key

# rpm -ql atomic-openshift-master
/etc/origin/.config_managed
/etc/origin/master/admin.crt
/etc/origin/master/admin.key
/etc/origin/master/admin.kubeconfig
/etc/origin/master/ca.crt
/etc/origin/master/ca.key
/etc/origin/master/ca.serial.txt
/etc/origin/master/etcd.server.crt
/etc/origin/master/etcd.server.key
/etc/origin/master
/etc/origin/master/master-config.yaml
/etc/origin/master/master.etcd-client.crt
/etc/origin/master/master.etcd-client.key
/etc/origin/master/master.kubelet-client.crt
/etc/origin/master/master.kubelet-client.key
/etc/origin/master/master.server.crt
/etc/origin/master/master.server.key
/etc/origin/master/openshift-master.crt
/etc/origin/master/openshift-master.key
/etc/origin/master/openshift-master.kubeconfig
/etc/origin/master/openshift-registry.crt
/etc/origin/master/openshift-registry.key
/etc/origin/master/openshift-registry.kubeconfig
/etc/origin/master/openshift-router.crt
/etc/origin/master/openshift-router.key
/etc/origin/master/openshift-router.kubeconfig
/etc/origin/master/policy.json
/etc/origin/master/serviceaccounts.private.key
/etc/origin/master/serviceaccounts.public.key
/etc/sysconfig/atomic-openshift-master
/usr/lib/systemd/system/atomic-openshift-master.service
/usr/share/atomic-openshift/migration
/usr/share/atomic-openshift/migration/fix-3.4-paths.sh
/usr/share/atomic-openshift/migration/migrate-image-manifests.sh

Additional info:
Comment 3 Steve Milner 2017-07-11 10:26:39 EDT
Date:   Fri Jul 31 14:35:40 2015 -0400

Oof, two years ago. Things have changed for sure!


Scott,

Is there a specific group who owns packaging for origin?
Comment 5 Scott Dodson 2017-07-11 10:36:52 EDT
Should/can we just blog all of origin/master rather than trying to keep the list up to date with every new file that comes and goes?

%files master
%ghost %config(noreplace) %{_sysconfdir}/origin/master/*
%ghost %config(noreplace) %{_sysconfdir}/origin/generated-configs/*

%files node
%ghost %config(noreplace) %{_sysconfdir}/origin/node/*

As far as ownership goes, it's the release component that owns it but I'm fine with cluster lifecycle team members owning the bugs.
Comment 6 Steve Milner 2017-07-12 09:04:40 EDT
(In reply to Scott Dodson from comment #5)
> Should/can we just blog all of origin/master rather than trying to keep the
> list up to date with every new file that comes and goes?
> 
> %files master
> %ghost %config(noreplace) %{_sysconfdir}/origin/master/*
> %ghost %config(noreplace) %{_sysconfdir}/origin/generated-configs/*
> 
> %files node
> %ghost %config(noreplace) %{_sysconfdir}/origin/node/*

I'm sure there was a reason for doing each file at the time. If that's no longer needed I +1 globbing.

I'll go ahead and make the PR.
Comment 7 Jan Pazdziora 2017-07-12 09:12:20 EDT
(In reply to Steve Milner from comment #6)
> 
> I'm sure there was a reason for doing each file at the time. If that's no
> longer needed I +1 globbing.
> 
> I'll go ahead and make the PR.

These as %ghost entries -- those files might not exist during build time, they get created in postinstall scriptlets.
Comment 8 Steve Milner 2017-07-12 09:32:48 EDT
I kept the file listing per the comment by Jan

PR: https://github.com/openshift/origin/pull/15163

Note You need to log in before you can comment on or make changes to this bug.