Merge lp://staging/~cthier/swift/drybins into lp://staging/~hudson-openstack/swift/trunk

Proposed by Chuck Thier
Status: Merged
Approved by: gholt
Approved revision: 68
Merged at revision: 67
Proposed branch: lp://staging/~cthier/swift/drybins
Merge into: lp://staging/~hudson-openstack/swift/trunk
Diff against target: 1152 lines (+241/-320)
26 files modified
bin/swift-account-auditor (+1/-30)
bin/swift-account-reaper (+1/-30)
bin/swift-account-replicator (+8/-25)
bin/swift-container-auditor (+1/-30)
bin/swift-container-replicator (+8/-24)
bin/swift-container-updater (+1/-23)
bin/swift-object-auditor (+1/-27)
bin/swift-object-replicator (+5/-44)
bin/swift-object-updater (+1/-24)
etc/proxy-server.conf-sample (+2/-2)
swift/account/auditor.py (+5/-4)
swift/account/reaper.py (+9/-7)
swift/account/replicator.py (+26/-0)
swift/common/daemon.py (+60/-0)
swift/common/db_replicator.py (+7/-6)
swift/common/utils.py (+2/-0)
swift/container/auditor.py (+5/-3)
swift/container/replicator.py (+25/-0)
swift/container/updater.py (+7/-5)
swift/obj/auditor.py (+8/-6)
swift/obj/replicator.py (+34/-8)
swift/obj/updater.py (+6/-4)
test/unit/common/test_db_replicator.py (+2/-2)
test/unit/container/test_updater.py (+7/-7)
test/unit/obj/test_replicator.py (+3/-3)
test/unit/obj/test_updater.py (+6/-6)
To merge this branch: bzr merge lp://staging/~cthier/swift/drybins
Reviewer Review Type Date Requested Status
gholt (community) Approve
Review via email: mp+34256@code.staging.launchpad.net

Description of the change

Refactored bin files to be more DRY

To post a comment you must log in.
Revision history for this message
Chuck Thier (cthier) wrote :

unit tests, functest, and probe tests all ran on my vm

Revision history for this message
gholt (gholt) wrote :

swift/account/reaper.py 110 has reference to self.reap_once()
swift/account/reaper.py 119 has reference to reap_forever
swift/common/db_replicator.py 435 has reference to self.replicate_once()

review: Needs Fixing
Revision history for this message
Chuck Thier (cthier) wrote :

> swift/account/reaper.py 110 has reference to self.reap_once()
> swift/account/reaper.py 119 has reference to reap_forever
> swift/common/db_replicator.py 435 has reference to self.replicate_once()

oops... thanks for catching that, should be fixed now

Revision history for this message
Jay Pipes (jaypipes) wrote :

Hi! You may want to use the existing daemon Python library instead of rewriting that stuff ;)

http://pypi.python.org/pypi/python-daemon/

Also, a litte nit: the standard way of passing options for daemonizing a process is not to pass "once" as a CLI arg, but to use CLI options, such as --nodaemon

Revision history for this message
Chuck Thier (cthier) wrote :

> Hi! You may want to use the existing daemon Python library instead of
> rewriting that stuff ;)
>
> http://pypi.python.org/pypi/python-daemon/
>
> Also, a litte nit: the standard way of passing options for daemonizing a
> process is not to pass "once" as a CLI arg, but to use CLI options, such as
> --nodaemon

Hey Jay, The main purpose of this was to refactor what we have currently to be more DRY. I'm not against moving to a standard lib for doing the daemon stuff, but don't have time to evaulate them. And as to the CLI args, I would like for those to change eventually as well, but that requires other changes as well, and was trying to keep the changes as minimal as possible.

Revision history for this message
gholt (gholt) wrote :

Thanks Chuck!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.