Modify

Ticket #874 (closed task: fixed)

Opened 12 years ago

Last modified 7 years ago

Ignore tag doesn't verify

Reported by: Jack Neely <[email protected]…> Owned by: solj
Priority: trivial Milestone: Bcfg2 1.3.5 Release (Bugfix)
Component: bcfg2-server Version: 1.0
Keywords: Cc: [email protected]

Description

I have a Bundle that looks like this:

<Bundle name='rlbase' version='2.0'>

  <!-- Misc configuration settings for Realm Linux -->

  <!-- These packages have changed config files that I don't currently 
  manage. -->

  <Package name="setup">
    <Ignore name="/etc/printcap"/>
    <Ignore name="/etc/aliases"/>
  </Package>

  <Package name="initscripts">
    <Ignore name="/etc/inittab"/>
    <Ignore name="/etc/sysconfig/init"/>
  </Package>

</Bundle>

The Bundle works. Even though I'm not managing the above files Bcfg2 ignores the fact that they have changed from what the RPM database says they should be.

However the bcfg2-repo-validate tool reports that this is horridly wrong.

/srv/bcfg2/root/Bundler/rlbase.xml ***FAILS*** to verify                <----
/srv/bcfg2/root/Bundler/rlbase.xml:8: element Package: Schemas validity error : Element 'Package': Character content is not allowed, because the content type is empty.
/srv/bcfg2/root/Bundler/rlbase.xml:8: element Package: Schemas validity error : Element 'Package': Element content is not allowed, because the content type is empty.
/srv/bcfg2/root/Bundler/rlbase.xml:13: element Package: Schemas validity error : Element 'Package': Character content is not allowed, because the content type is empty.
/srv/bcfg2/root/Bundler/rlbase.xml:13: element Package: Schemas validity error : Element 'Package': Element content is not allowed, because the content type is empty.
/srv/bcfg2/root/Bundler/rlbase.xml fails to validate

Attachments

Change History

comment:1 Changed 12 years ago by solj

  • Cc [email protected] added
  • Owner changed from desai to solj
  • Status changed from new to accepted

comment:2 Changed 12 years ago by solj

Can you try the following to see if it fixes the issue:

diff --git a/schemas/atom.xsd b/schemas/atom.xsd
index 94d70fe..0d5ba80 100644
--- a/schemas/atom.xsd
+++ b/schemas/atom.xsd
@@ -8,6 +8,34 @@
   </xsd:annotation>
 
   <xsd:complexType name='StructureEntry'>
+    <xsd:choice minOccurs='0' maxOccurs='unbounded'>
+      <xsd:element name='Ignore'>
+        <xsd:complexType>
+          <xsd:attribute type='xsd:string' name='name'/>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name='Instance'>
+        <xsd:complexType>
+          <xsd:choice minOccurs='0' maxOccurs='unbounded'>
+            <xsd:element name='Ignore'>
+              <xsd:complexType>
+                <xsd:attribute type='xsd:string' name='name'/>
+              </xsd:complexType>
+            </xsd:element>
+          </xsd:choice>
+          <xsd:attribute name='arch' type='xsd:string'/>
+          <xsd:attribute name='epoch' type='xsd:string'/>
+          <xsd:attribute name='version' type='xsd:string'/>
+          <xsd:attribute name='release' type='xsd:string'/>
+          <xsd:attribute name='simplefile' type='xsd:string'/>
+          <xsd:attribute name='pkg_verify' type='xsd:string'/>
+          <xsd:attribute name='verify_flags' type='xsd:string'/>
+          <xsd:attribute name='installed_action' type='xsd:string'/>
+          <xsd:attribute name='version_fail_action' type='xsd:string'/>
+          <xsd:attribute name='verify_fail_action' type='xsd:string'/>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:choice>
     <xsd:attribute type='xsd:string' name='name' use='required'/>
     <xsd:attribute type='xsd:string' name='altsrc' />
   </xsd:complexType>

comment:3 follow-up: ↓ 4 Changed 12 years ago by solj

  • Milestone changed from Bcfg2 1.2.0 Release to Bcfg2 1.1.0 Release

comment:4 in reply to: ↑ 3 ; follow-up: ↓ 5 Changed 12 years ago by Jack Neely <[email protected]…>

Replying to solj:

This patch appears to do the job. My repo now validates with the Ignore tag. Thanks!

comment:5 in reply to: ↑ 4 Changed 12 years ago by solj

Replying to Jack Neely <[email protected]…>:

Replying to solj:

This patch appears to do the job. My repo now validates with the Ignore tag. Thanks!

Great! That should work until I can add Desai's suggestion of a new Path type (ignore) which will function solely as the Ignore tag does now.

comment:6 Changed 12 years ago by solj

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

Added new mechanism for specifying Paths that should be ignored in your config in [154459887d26029fe7aab0f0a681805ea2ef2a6a] (SVN r5851). Documentation can be found at trunk/bcfg2/doc/client/tools/yumng.txt.

comment:7 Changed 7 years ago by [email protected]

  • Priority changed from major to trivial
  • Type changed from defect to task
  • Milestone changed from Bcfg2 1.1.0 Release to Bcfg2 1.3.5 Release (Bugfix)

I am using version 1.3.5 and pkgmgr. May be is per package Ignore tag deprecated. Testing bundle:

<Bundle name='bcfg2' version='2.0'>
    <Group name='sled12'>
        <Package name='bcfg2'>
            <Ignore name='/etc/sysconfig/bcfg2'/>
        </Package>
        <Service name='bcfg2'/>
        <Path name='/etc/pki/bcfg2/bcfg2.crt'/>
        <Path name='/etc/bcfg2.conf'/>
        <Path name='/etc/sysconfig/bcfg2'/>
    </Group>
    
</Bundle>

and bcfg2-repo-validate result:

[[email protected] bcfg2]# bcfg2-repo-validate 
ERROR: /var/lib/bcfg2/Bundler/bcfg2.xml fails to verify:
  /var/lib/bcfg2/Bundler/bcfg2.xml:3: element Package: Schemas validity error : Element 'Package': Character content is not allowed, because the content type is empty.
  /var/lib/bcfg2/Bundler/bcfg2.xml:3: element Package: Schemas validity error : Element 'Package': Element content is not allowed, because the content type is empty.
  /var/lib/bcfg2/Bundler/bcfg2.xml fails to validate
Serverless plugins encountered errors, skipping server plugins
1 errors
0 warnings

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.