Modify

Ticket #894 (closed defect: fixed)

Opened 13 years ago

Last modified 13 years ago

duplicate <Package ... > elements in Bundler/ and Rules/ cause problems

Reported by: Remi Broemeling <[email protected]…> Owned by: desai
Priority: minor Milestone: Bcfg2 1.1.1 Release (Bugfix)
Component: bcfg2-server Version: 1.0
Keywords: duplicate package not handled Cc:

Description

I encountered this when setting up memcached to be installed through bcfg2. I mistakenly copy/pasted too much from my Bundler/memcached.xml to my Rules/memcached.xml and ran into this problem.

Bundler/memcached.xml

<Bundle name='memcached'>
        <Package name='memcached' />

        <Path name='/etc/memcached.conf' />

        <Service name='memcached' />
</Bundle>

Problematic Rules/memcached.xml

<Rules priority='0'>
        <Group name='rails-server'>
                <Package name='memcached' />
                <Service type='deb' status='on' name='memcached' />
        </Group>
</Rules>

With this Rules/memcached.xml (above, labelled problematic), bcfg2 reports:

# bcfg2 -vqe
Loaded tool drivers:
 APT      Action   DebInit  POSIX    Upstart
The following entries are not handled by any tool:
 Package:None:memcached


Phase: initial
Correct entries:        528
Incorrect entries:      1
Total managed entries:  529
Unmanaged entries:      2


Phase: final
Correct entries:        528
Incorrect entries:      1
 Package:memcached
Total managed entries:  529
Unmanaged entries:      2
 Package:memcached          Service:network-interface
#

Fixed Rules/memcached.xml

<Rules priority='0'>
        <Group name='rails-server'>
                <Service type='deb' status='on' name='memcached' />
        </Group>
</Rules>

With the spurious (duplicate) <Package ... > element removed from Rules/memcached.xml, everything works correctly and memcached is installed and managed by bcfg2.

Note that both of the files above (both the problematic and the fixed versions of the Rules/memcached.xml file) pass repository validation via bcfg2-repo-validate. As well, bcfg2-server doesn't produce any noticeable errors in syslog when serving the problematic version of the Rules/memcached.xml file (soljr suggested that it should be complaining about "the entry being served by multiple generators", but I did not observe that error message on my configuration).

Software in use was:

Ubuntu Lucid Lynx
Package Name         Package Version
bcfg2                1.1.0-1+r5916~testing1~lucid1
bcfg2-server         1.1.0-1+r5916~testing1~lucid1
memcached            1.4.2-1ubuntu3

Attachments

Change History

comment:1 Changed 13 years ago by desai

  • Status changed from new to closed
  • Resolution set to fixed

This is actually a weird sort of issue. We want to be able to support the specification of Packages using the Rules plugin. The problem is that the entry there was actually incomplete, but the schema wasn't enforcing attribute inclusion for it. I've tightened up the schema in [fd92b580848414bd8785e1c4f3319b56c09d29ef] (SVN r5945).

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.