Bug 208548 - iscsi: move locks to /var/lock; also create /etc/iscsi/nodes and /etc/iscsi/send_targets
iscsi: move locks to /var/lock; also create /etc/iscsi/nodes and /etc/iscsi/s...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: iscsi-initiator-utils (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike Christie
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-29 07:26 EDT by Mark McLoughlin
Modified: 2012-06-26 12:09 EDT (History)
1 user (show)

See Also:
Fixed In Version: iscsi-initiator-utils-6.2.0.695-0.5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-05 06:16:14 EDT
Type: ---
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 Mark McLoughlin 2006-09-29 07:26:32 EDT
While trying to create an iSCSI root initrd, I noticed that

  $> iscsiadm -m discovery -t st -p foo

tries to:

  - create and write to the nodes/ and send_targets directories
  - create the /etc/iscsi/lock file and lock.write symlink

Wouldn't these be better under e.g. /var/lib/iscsi and /var/lock (respectively)

I see the PID file just moved to /var too ...

Also note, if we add /var/lib/iscsi we need /etc/rwtab to contain

  empty /var/lib/iscsi

or if we stick with /etc/iscsi, then we need:

  files /etc/iscsi
Comment 1 Mike Christie 2006-09-29 12:31:19 EDT
(In reply to comment #0)
> While trying to create an iSCSI root initrd, I noticed that
> 
>   $> iscsiadm -m discovery -t st -p foo
> 
> tries to:
> 
>   - create and write to the nodes/ and send_targets directories
>   - create the /etc/iscsi/lock file and lock.write symlink
> 
> Wouldn't these be better under e.g. /var/lib/iscsi and /var/lock (respectively)


I can understnad lock.write going into /var/lock, but I am not sure about the
nodes and discovery values. Does your bz title and comment here mean that it
should go into /var because it is transient? If so I just want to clarify that
those are not transient. They are setup files like
/etc/sysconfig/network-scripts/ifcfg-eth0. Originally we had them in sysconfig,
but upstream did not like that (something about it being red hat specific), so
we moved it upstream to /etc/iscsi and just left it there for fedora/RHEL
because I did not know better at the time.


> 
> I see the PID file just moved to /var too ...
> 
> Also note, if we add /var/lib/iscsi we need /etc/rwtab to contain
> 
>   empty /var/lib/iscsi
> 
> or if we stick with /etc/iscsi, then we need:
> 
>   files /etc/iscsi

Where do we need this? In the spec file or init script?
Comment 2 Mark McLoughlin 2006-10-02 09:56:37 EDT
Moving the locks to /var/lock would be a good start

In order to make /etc/iscsi/nodes and /etc/iscsi/send_targets writable when the
root filesystem is read-only, the /etc/rwtab should contain:

  files /etc/iscsi/nodes
  files /etc/iscsi/send_targets

instead of

  files /var/db/iscsi

I'll log another bug on that.

Note, in order for this to work the iscsi-initiator-utils should create these
two directories at installation time.
Comment 3 Mike Christie 2006-10-02 11:52:31 EDT
Ah ok, thanks Mark.

One other question. What is the /var/locks dir for? Should the iscsi lock file
go there?
Comment 4 Mark McLoughlin 2006-10-02 11:58:20 EDT
(In reply to comment #3)
> 
> One other question. What is the /var/locks dir for? Should the iscsi lock file
> go there?

/var/lock ? It's for lock files just like the iscsi ones ...

Comment 5 Mike Christie 2006-10-02 12:05:50 EDT
Sorry, sorry I misread your bugzilla. For some reason I thought you wanted the
lock under some other dir there. Igore that :)
Comment 6 Mike Christie 2006-10-02 15:37:49 EDT
One last question though. Is it preferable to have the installer (make install
or rpm) make the /var/iscsi, /var/lib/iscsi files or is the app normally
supposed to do this?
Comment 7 Mike Christie 2006-10-02 16:19:53 EDT
Ignore that. I have done a fix for this and moved the lock stuff to /var/lock/iscsi.

I will wait to build into brew and update until we have the other BZ fixed,
unless it will help your testing. Thanks.

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