Bug 643302
| Summary: | some enhancements to tgt's configuration files | |||
|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Satoru SATOH <ssato> | |
| Component: | scsi-target-utils | Assignee: | Pádraig Brady <p> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | low | |||
| Version: | rawhide | CC: | afazekas, mchristi, pbrady, p, terje.rosten | |
| Target Milestone: | --- | Keywords: | Reopened | |
| Target Release: | --- | |||
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 861249 (view as bug list) | Environment: | ||
| Last Closed: | 2012-11-16 07:36:37 UTC | Type: | --- | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 861249 | |||
| Attachments: | ||||
|
Description
Satoru SATOH
2010-10-15 08:33:51 UTC
Created attachment 453673 [details]
example of rpm spec changes
Created attachment 453675 [details]
modified version of targets.conf: all comments of target examples are removed.
Created attachment 453677 [details]
/etc/tgt/conf.d/sample.conf: sample target configurations
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. lets get this in F17. Thanks Satoh-san, rpm updated and building for rawhide (F18) now. Any chance we could backport this to F17 and RHEL6 ? It would simplify OpenStack Folsom installation for one thing. F17 sure. Do you by any chance want to handle that one? RHEL6 more difficult, we may want to clone this bug and handle separately if this is something that OpenStack would really like. OK I'll have a look at updating F17. OpenStack would really like to: include /var/lib/cinder/volumes/* include /var/lib/nova/volumes/* However adding that to /etc/tgt/targets.conf on package install/upgrade is very awkward. Do you perhaps have tricks to easily enable that without supporting /etc/tgt/conf.d/ ? Otherwise it would be really nice to have on RHEL. thanks. scsi-target-utils-1.0.24-4.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/scsi-target-utils-1.0.24-4.fc17 This may be a off topic, but: (In reply to comment #9) > OK I'll have a look at updating F17. > > OpenStack would really like to: > > include /var/lib/cinder/volumes/* > include /var/lib/nova/volumes/* > > However adding that to /etc/tgt/targets.conf on package install/upgrade is > very awkward. Do you perhaps have tricks to easily enable that without > supporting /etc/tgt/conf.d/ ? Otherwise it would be really nice to have on > RHEL. > > thanks. How about nesting includes ? That is, for example, /etc/tgt/targets.conf: include /etc/tgt/conf.d/*.conf /etc/tgt/conf.d/cinder.conf: include /etc/cinder/volumes.d/*.conf /etc/tgt/conf.d/nova.conf: include /etc/nova/volumes.d/*.conf I'm not sure if tgt-admin (perl's Config::General module) supports nesting includes but it looks so: http://search.cpan.org/dist/Config-General/General.pm Yep that's what I intend to do on F17 and F18. My question was directed to installations that didn't support /etc/tgt/conf.d I.E. it looks very awkward, so it would be great to support this config option automatically on RHEL 6 too. thanks. scsi-target-utils-1.0.24-4.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. Created attachment 617838 [details] allow conf.d files to include directories When testing this it was noticed that perl's Config::General does not recursively expand globs, only doing so on the first level. I've added a query about that at: https://rt.cpan.org/Public/Bug/Display.html?id=79869 In the meantime though we could still support the setup detailed in comment 11 by enabling the IncludeDirectories option as done in the attached patch. Would it be OK if I updated Fedora 17 and Fedora 18 with that tweak? That change looks good, but there's another issue I'd also like to fix, to put this all firmly to rest. I'm concerned that if the system admin has modified targets.conf then the new targets.conf with the new include directive will be installed as .rpmnew, and thus stuff in tgt/conf.d/* won't get picked up. Perhaps we need to have tgt-admin actually start with a stub .conf that just includes tgt/targets.conf and tgt/conf.d/* to ensure this doesn't happen? comment 15 sounds good to me. Supports upgrade and traditional scripts that munge targets.conf scsi-target-utils-1.0.30-4.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/scsi-target-utils-1.0.30-4.fc18 scsi-target-utils-1.0.24-5.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/scsi-target-utils-1.0.24-5.fc17 Package scsi-target-utils-1.0.24-5.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing scsi-target-utils-1.0.24-5.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-14975/scsi-target-utils-1.0.24-5.fc17 then log in and leave karma (feedback). Now, I have scsi-target-utils-1.0.32-1.fc18.x86_64. Looks like the tgt-admin --execute (or --update) starts the parsing (as expected by most documentation) with the tgt/targets.conf and in this way it will never read the /etc/tgt/conf.d/*. When restart the tgtd it starts with the tgt/tgtd.conf and read everything, but it is too late for cinder.. As a workaround now I have just one line in the tgtd.conf which includes the targets.conf which includes the /etc/tgt/conf.d/*.conf ... pretty long chain :) I think if we change the tgt-admin behavior to start with the tgtd.conf causes more confusion, since /etc/tgt/targets.conf expected by most users. Created attachment 639693 [details] possible fix to comment 20 Thanks for looking into that Attila. So is systemd using stale settings on update? Perhaps this is addressed with this patch? The systemd using the correct IMHO. When you strace -Ff -e open tgt-admin --execute you can see does it read the cinders config files (2>&1 | grep conf[.]d) or not. I expect it to read it. This is important. The cinder uses the --update , which implies config re-parse like with --execute. cinder does not restart the tgtd. I just saw a _manual_ restart caused only to read the cinder configs, but I expect it reread without touching the systemd. The tgt-admin --update <..> MUST reread the cinder configs. Cinder expects it. If you need more detailed examples, let me know. Created attachment 640036 [details] fix for comment 20 Oh, tgt-admin itself hardcodes /etc/tgt/targets.conf rather than reading the /etc/sysconfig value. That was unexpected. This patch should get it working. scsi-target-utils-1.0.32-2.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/scsi-target-utils-1.0.32-2.fc18 scsi-target-utils-1.0.24-6.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/scsi-target-utils-1.0.24-6.fc17 scsi-target-utils-1.0.32-2.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. scsi-target-utils-1.0.24-6.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. |