Bug 1110526 - rhnpush cannot read packages from mounted iso on USB
Summary: rhnpush cannot read packages from mounted iso on USB
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space27
TreeView+ depends on / blocked
 
Reported: 2014-06-17 20:34 UTC by sysadmin
Modified: 2017-09-28 18:09 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-20 06:16:35 UTC
Embargoed:


Attachments (Terms of Use)

Description sysadmin 2014-06-17 20:34:46 UTC
Description of problem:
I have mounted a USB stick with a copy of CentOS 6.5 on it. I can look at/into all the files on the drive

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


How reproducible:
All times

Steps to Reproduce:
1.mount usb stick to /media/usb (mount /dev/sdc1 /media/usb)
2.Create channel centos6.5_x86-64
3.rhnpush -v  -u admin --channel=centos6.5_x86-64 --server=http://localhost --dir=/media/usb/Packages

Actual results:
ERROR: unhandled exception occurred: (Cannot read from directory /var/=/media/usb/Packages).

Expected results:
Packages loaded from directory

Additional info:
If I try to rhnpush with just the rpms (rhnpush -v  -u admin  --channel=centos6.5_x86-64 --server=http://localhost /media/usb/Packages/*rpm), this begins loading packages

Comment 1 Jan Pazdziora 2014-06-19 08:33:14 UTC
Are you sure you don't have space between --dir and =/media/usb/Packages?

Comment 2 sysadmin 2014-06-19 15:47:40 UTC
Hi Jan,
That came copy/paste from history.

More interesting notes (maybe):
1) did the same using the -d instead of --dir.

2) at one point the output said ERROR: unhandled exception occurred: (Cannot read from directory /var/rhn/=/media/usb/Packages).

Comment 3 Jan Pazdziora 2014-06-19 15:59:54 UTC
(In reply to sysadmin from comment #2)
> Hi Jan,
> That came copy/paste from history.
>
> More interesting notes (maybe):
> 1) did the same using the -d instead of --dir.

So what error do you get when you run with the -d option:

rhnpush -v  -u admin --channel=centos6.5_x86-64 --server=http://localhost -d /media/usb/Packages

?

Comment 4 sysadmin 2014-06-19 16:01:22 UTC
At the time is was exactly the same as --dir.

Comment 5 Jan Pazdziora 2014-06-19 16:15:02 UTC
(In reply to sysadmin from comment #4)
> At the time is was exactly the same as --dir.

So even if you specify -d /media/usb/Packages (without any = sign), you still get the Cannot read from directory /var/=/media/usb/Packages message with the = sign?

Can you please retry with -vvv ?

Comment 6 sysadmin 2014-06-19 16:41:47 UTC
This looks like my not reading the help properly and you are correct in your line of reasoning.

I DID use '-d=' instead of '-d ' and '-dir' instead of '--dir'

So here is what the wrong directory switches produced doing the command from inside /var/log directory.

-d=/media/usb/Packages>>>ERROR
ERROR: unhandled exception occurred: (Cannot read from directory /var/log/=/media/usb/Packages).

--d=/media/usb/Packages>>>WORKS
Uploading files from directory /media/usb/Packages
Connecting to http://localhost/APP
Password:
url is http://localhost/PACKAGE-PUSH
Result codes: 200 OK
Computing checksum and package info. This may take some time ...

-dir=/media/usb/Packages>>ERROR
ERROR: unhandled exception occurred: (Cannot read from directory /var/log/ir=/media/usb/Packages).

--dir /media/usb/Packages>>WORKS
Connecting to http://localhost/APP
Password:
url is http://localhost/PACKAGE-PUSH
Result codes: 200 OK
Computing checksum and package info. This may take some time ...

Can't say I understand what is going on here other than somehow using an '=" sign make it pass in the current directory.

Sorry to waste your time with my RTFM

Comment 7 Jan Pazdziora 2014-06-20 06:16:35 UTC
(In reply to sysadmin from comment #6)
> Can't say I understand what is going on here other than somehow using an '="
> sign make it pass in the current directory.

It's kind of expected -- unlike the long options (--dir), the short options (-d) have no knowledge / support for the = sign. So the short options take whatever follows as the parameter value, inluding the = sign.

Let me close this bugzilla now.

Comment 8 Eric Herget 2017-09-28 18:09:04 UTC
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.


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