Modify

Ticket #989 (closed defect: duplicate)

Opened 12 years ago

Last modified 8 years ago

Package verification failures are recording wrong error

Reported by: jreddy Owned by: solj
Priority: major Milestone: Bcfg2 1.3.5 Release (Bugfix)
Component: bcfg2-reports Version: 1.0
Keywords: reporting Cc:

Description

This bug exists in Bcfg2 1.1.1.

Packages that are recording "Bad Package" with the reason being version differences are actually not a result of different version. They are actually an issue with specific files from the package having been modified. Take the following for example, "aaa_base" from a SuSE 10 client.

The running "bcfg2 -q -v -d" provides this snippet of output:

Verifying package instances for aaa_base
        0:10-12.58.1.x86_64
        verify_flags = ['', 'nomd5']
 {'files': [['RPMVERIFY_MTIME', 'c', '/etc/inittab'], 
 ['RPMVERIFY_FILESIZE', 'RPMVERIFY_MTIME', 'c', '/etc/mailcap'],
 ['RPMVERIFY_FILESIZE', 'RPMVERIFY_MTIME', 'c', '/etc/mime.types']],
 'nevra': ('aaa_base', None, '10', '12.58.1', 'x86_64')}
        Modlist/Ignore match: /etc/inittab
*** Instance 0:10-12.58.1.x86_64 failed RPM verification ***
        Package aaa_base failed verification.

It's clear that the error here is a result of the 3 files from the aaa_base RPM having been modified. However, the error gets recorded in the database as a version discrepancy, and not as files having been modified.

Reporting deviation from expected state must be done accurately in order to correct configurations.

Attachments

Change History

comment:1 Changed 12 years ago by solj

  • Owner changed from desai to solj
  • Status changed from new to accepted
  • Milestone changed from Bcfg2 1.1.2 Release (Bugfix) to Bcfg2 1.2.0 Release

The current reporting model doesn't account for this 'reason'

class Reason(models.Model):
    """reason why modified or bad entry did not verify, or changed."""
    owner = models.TextField(max_length=128, blank=True)
    current_owner = models.TextField(max_length=128, blank=True)
    group = models.TextField(max_length=128, blank=True)
    current_group = models.TextField(max_length=128, blank=True)
    perms = models.TextField(max_length=4, blank=True)  # txt fixes typing issue
    current_perms = models.TextField(max_length=4, blank=True)
    status = models.TextField(max_length=3, blank=True)  # on/off/(None)
    current_status = models.TextField(max_length=1, blank=True)  # on/off/(None)
    to = models.TextField(max_length=256, blank=True)
    current_to = models.TextField(max_length=256, blank=True)
    version = models.TextField(max_length=128, blank=True)
    current_version = models.TextField(max_length=128, blank=True)
    current_exists = models.BooleanField()  # False means its missing. Default True
    current_diff = models.TextField(max_length=1280, blank=True)
    is_binary = models.BooleanField(default=False)

This enhancement will need to be added in 1.2.0

comment:2 Changed 12 years ago by solj

  • Component changed from bcfg2-client to bcfg2-reports
  • Milestone changed from Bcfg2 1.2.0 Release to Bcfg2 1.3.0 Release

Moving to 1.3.0.

comment:3 Changed 10 years ago by solj

  • Milestone changed from Bcfg2 1.3.0 Release to Bcfg2 1.3.2 Release (Bugfix)

comment:4 Changed 8 years ago by solj

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

Created new ticket in github: https://github.com/Bcfg2/bcfg2/issues/313

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.