Modify ↓
Ticket #293 (closed defect: wontfix)
Unable to create a SymLink element in Bundle
Reported by: | naapuri | Owned by: | desai |
---|---|---|---|
Priority: | major | Milestone: | Bcfg2 0.8.7 Release (LISA) |
Component: | bcfg2-server | Version: | |
Keywords: | Cc: |
Description
The example repo claims that the SymLink? element can be used inside a Bundle, but it can't:
/var/lib/bcfg2/Bundler/exim4.xml ***FAILS*** to verify <---- <?xml version="1.0"?> <Bundle name="exim4" version="2.0"> <Group name="relay-mailserver"> <Package name="exim4"/> <Package name="exim4-base"/> <Package name="exim4-config"/> <Package name="exim4-daemon-light"/> <Service name="exim4"/> <SymLink name="/etc/foo" to="/etc/bar"/> </Group> </Bundle> /var/lib/bcfg2/Bundler/exim4.xml:9: element SymLink: Schemas validity error : Element 'SymLink', attribute 'to': The attribute 'to' is not allowed. /var/lib/bcfg2/Bundler/exim4.xml fails to validate
However, SymLink? entries can be written to Rules/*.xml:
<Rules priority='0'> <Group name='relay-mailserver'> <SymLink name="/etc/foo" to="/etc/bar"/> </Group> </Rules>
... But these rules don't seem to be applied at all.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
This one actually isn't a bug. Structures (the bundler and base) are used to decide which entries need to be installed on a given client. (ie clients in the group relay-mailserver need to have packge exim4 installed, etc) Generators are the logic that decides which version of those entries need to be installed on a given client. (ie, this client should get version X of exim4) (Rules, Pkgmgr, Svcmgr, and SSHbase are all generators)
In general, entries included in bundles only allow the name attribute to be set. We do this to allow different literal entries for clients with the same bundle. (Consider the case where the exim4 bundle is used and /etc/foo to point to /etc/bar in some cases and /etc/bar2 in others)
The reason that you didn't get the intended result by putting the entry in rules is because there was no trigger to cause the entry to get included in the config; this would require an entry in bundler or base. (of the form <SymLink? name='/etc/foo'/>