Modify

Ticket #831 (accepted defect)

Opened 13 years ago

Last modified 10 years ago

Bcfg2 should not update mtime on metadata changes

Reported by: https://www.google.com/accounts/o8/id?id=AItOawlgX-1giylmugdMyws_Brrk63uA_dyfDnU Owned by: solj
Priority: minor Milestone: Bcfg2 1.4.0 Release
Component: bcfg2-client Version: 1.0
Keywords: chmod chown stat mtime ctime Cc: [email protected]

Description

When permissions or ownership of a file change, Bcfg2 is not only updating the file metadata, but also the file itself. So an update to the user, for instance, will also cause the entire file to be rewritten. This affects both mtime and ctime.

Note, however, that subsequent Bcfg2 calls will still chmod/chown the file and update the ctime, even though the permissions are the same--but will not actually modify the file.

This is a problem for programs that use mtime to determine whether or not to refresh changes from the disk, and can produce unexpected results.

Attachments

Change History

comment:1 Changed 13 years ago by solj

  • Milestone changed from Bcfg2 1.0.x Doc to Bcfg2 1.1.0 Release

comment:2 Changed 13 years ago by solj

  • Milestone changed from Bcfg2 1.1.0 Release to Bcfg2 1.1.1 Release (Bugfix)

comment:3 Changed 12 years ago by solj

  • Milestone changed from Bcfg2 1.1.1 Release (Bugfix) to Bcfg2 1.1.2 Release (Bugfix)

comment:4 in reply to: ↑ description 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

Replying to https://www.google.com/accounts/o8/id?id=AItOawlgX-1giylmugdMyws_Brrk63uA_dyfDnU:

When permissions or ownership of a file change, Bcfg2 is not only updating the file metadata, but also the file itself. So an update to the user, for instance, will also cause the entire file to be rewritten. This affects both mtime and ctime.

I think we should be able to fix this by creating file hashes on the server and comparing them to the file contents of the client.

Note, however, that subsequent Bcfg2 calls will still chmod/chown the file and update the ctime, even though the permissions are the same--but will not actually modify the file.

The Installfile method in browser:src/lib/Client/Tools/POSIX.py should only be called when the file is incorrect. I don't see where this could be happening.

comment:5 Changed 12 years ago by solj

  • Milestone changed from Bcfg2 1.2.0 Release to Bcfg2 1.2.1 Release (Bugfix)

comment:6 Changed 11 years ago by solj

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

This seems a bit invasive for a bugfix release. Moving to 1.3.

comment:7 Changed 10 years ago by solj

  • Cc [email protected] added
  • Milestone changed from Bcfg2 1.3.0 Release to Bcfg2 1.4.0 Release

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 accepted
Author


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

 
Note: See TracTickets for help on using tickets.