Bug 208548 - iscsi: move locks to /var/lock; also create /etc/iscsi/nodes and /etc/iscsi/send_targets
Summary: iscsi: move locks to /var/lock; also create /etc/iscsi/nodes and /etc/iscsi/s...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: iscsi-initiator-utils
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mike Christie
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-09-29 11:26 UTC by Mark McLoughlin
Modified: 2012-06-26 16:09 UTC (History)
1 user (show)

Fixed In Version: iscsi-initiator-utils-6.2.0.695-0.5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-10-05 10:16:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mark McLoughlin 2006-09-29 11:26:32 UTC
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 16:31:19 UTC
(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 13:56:37 UTC
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 15:52:31 UTC
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 15:58:20 UTC
(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 16:05:50 UTC
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 19:37:49 UTC
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 20:19:53 UTC
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.