Recently I was doing some testing with EL6, and when I ran the following command: pulp-admin node repo enable --repo-id zoo I received this exception: RuntimeError: Cannot read configuration file: /etc/pulp/server.conf I am running as user 'cloud-user' when I run the command, that user does not have permissions to read that file. See the permissions below: -rw-r-----. 1 root apache 10466 Aug 26 17:32 /etc/pulp/server.conf I shouldn't need super user privileges to run pulp-admin. This is a fresh install on a new VM, and I followed the install docs to the letter.
pulp-admin should never read server.conf. It is not guaranteed to even exist, since it is part of the pulp-server package. pulp-admin is supposed to be able to run on a different host than the Pulp server. This bug should be about stopping pulp-admin from trying/needing to read that file.
I had to resolve find a workaround on my system, so I uninstalled these packages and pulp-admin started behaving correctly. These came as part of the @pulp-nodes-parent install group. pulp-nodes-admin-extensions pulp-nodes-parent
https://github.com/pulp/pulp/pull/1279
This is a duplicate of: 1135589
Correction: This is related to: https://bugzilla.redhat.com/show_bug.cgi?id=1116040
https://bugzilla.redhat.com/show_bug.cgi?id=1160410 is the bug to do the API change in 3.0
merged to 2.5-dev and master
fixed in pulp 2.6.0-0.2.beta
>> rpm -qa pulp-server pulp-server-2.6.0-0.2.beta.el6.noarch >> rpm -qa | grep nodes pulp-nodes-admin-extensions-2.6.0-0.2.beta.el6.noarch pulp-nodes-child-2.6.0-0.2.beta.el6.noarch pulp-nodes-common-2.6.0-0.2.beta.el6.noarch pulp-nodes-consumer-extensions-2.6.0-0.2.beta.el6.noarch pulp-nodes-parent-2.6.0-0.2.beta.el6.noarch >> ls -l /etc/pulp | grep server drwxr-xr-x. 3 root root 4096 Dec 24 08:52 server [root@host~]# exit logout [ec2-user@host ~]$ pulp-admin rpm repo create --repo-id zaika Successfully created repository [zaika] [ec2-user@host ~]$ pulp-admin node repo enable --repo-id zaika Repository enabled. Note: Repository [ zaika ] will not be available for node synchronization until published. See: the 'node repo publish' command. Warning: enabling with auto-publish may degrade repository synchronization performance. [ec2-user@host ~]$ pulp-admin node repo publish --repo-id zaika This command may be exited via ctrl+c without affecting the request. [\] Running... Publish succeeded. [ec2-user@host ~]$ pulp-admin node repo list +----------------------------------------------------------------------+ Enabled Repositories +----------------------------------------------------------------------+ Id: zaika Display Name: zaika Description: None Content Unit Counts: and I checked that on rh6 for pulp 2.5 There is exception, right >> pulp-admin node repo list Traceback (most recent call last): File "/usr/bin/pulp-admin", line 9, in <module> load_entry_point('pulp-client-admin==2.5.0', 'console_scripts', 'pulp-admin')() .... raise RuntimeError('Cannot read configuration file: %s' % config_file) RuntimeError: Cannot read configuration file: /etc/pulp/server.conf and also checked on f20 with pulp 2.6 for a case, evrth is ok there.
Moved to https://pulp.plan.io/issues/506