Issue #506
closedpulp-admin node repo enable says "Cannot read configuration file: /etc/pulp/server.conf"
Description
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.
+ This bug was cloned from Bugzilla Bug #1135589 +
Updated by rbarlow over 8 years ago
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.
+ This comment was cloned from Bugzilla #1135589 comment 1 +
Updated by bmbouter over 8 years ago
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
+ This comment was cloned from Bugzilla #1135589 comment 2 +
Updated by cduryee over 8 years ago
https://github.com/pulp/pulp/pull/1279
+ This comment was cloned from Bugzilla #1135589 comment 3 +
Updated by jortel@redhat.com over 8 years ago
This is a duplicate of: 1135589
+ This comment was cloned from Bugzilla #1135589 comment 4 +
Updated by jortel@redhat.com over 8 years ago
Correction: This is related to: https://bugzilla.redhat.com/show_bug.cgi?id=1116040
+ This comment was cloned from Bugzilla #1135589 comment 5 +
Updated by cduryee over 8 years ago
https://bugzilla.redhat.com/show_bug.cgi?id=1160410 is the bug to do the API change in 3.0
+ This comment was cloned from Bugzilla #1135589 comment 6 +
Updated by cduryee over 8 years ago
merged to 2.5-dev and master
+ This comment was cloned from Bugzilla #1135589 comment 7 +
Updated by cduryee over 8 years ago
fixed in pulp 2.6.0-0.2.beta
+ This comment was cloned from Bugzilla #1135589 comment 8 +
Updated by igulina@redhat.com over 8 years ago
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.
+ This comment was cloned from Bugzilla #1135589 comment 9 +
Updated by rbarlow over 8 years ago
- Status changed from 6 to CLOSED - CURRENTRELEASE