Project

Profile

Help

Issue #506

pulp-admin node repo enable says "Cannot read configuration file: /etc/pulp/server.conf"

Added by bmbouter over 6 years ago. Updated over 2 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Master
Platform Release:
2.6.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

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 +

History

#1 Updated by rbarlow over 6 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 +

#2 Updated by bmbouter over 6 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 +

#4 Updated by jortel@redhat.com over 6 years ago

This is a duplicate of: 1135589

+ This comment was cloned from Bugzilla #1135589 comment 4 +

#5 Updated by jortel@redhat.com over 6 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 +

#6 Updated by cduryee over 6 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 +

#7 Updated by cduryee over 6 years ago

merged to 2.5-dev and master

+ This comment was cloned from Bugzilla #1135589 comment 7 +

#8 Updated by cduryee over 6 years ago

fixed in pulp 2.6.0-0.2.beta

+ This comment was cloned from Bugzilla #1135589 comment 8 +

#9 Updated by igulina@redhat.com over 6 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 +

#10 Updated by bmbouter over 6 years ago

  • Severity changed from Medium to 2. Medium

#11 Updated by rbarlow over 6 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#13 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF