Red Hat Bugzilla – Bug 846041
"rhc-outage sync" pushes blindly to other hosts, doesn't sync from other hosts,
Last modified: 2015-05-14 21:13:14 EDT
Description of problem:
I installed a new ex-srv1.prod. /app/status web page came up blank (nothing the the outabe sqlite DB). The others nodes had the complete outage history.
I wanted to sync ex-srv1.prod, so on ex-srv1.prod I ran the following command:
[email@example.com status]# bundle exec ./rhc-outage sync
This pushed out the blank DB to all the other nodes.
The db doesn't need to be blank, it just needs to be different. The one that is pushing will be treated as authoritative.
This sync is doing a push, rather than a true sync.
Steps to Reproduce:
1. have a blank status.sqlite3 on one ex-srv1
2. have a populated db on another ex-srv2
3. run "bundle exec ./rhc-outage sync" on ex-srv1
on ex-srv2 that the db is now blank.
I would expect ex-srv1 to be brought up to date from ex-srv2.
If this couldn't happen, I would expect a warning saying that things are newer on ex-srv2.
It would also be extremely useful if the sync script would make a backup of the existing DB before overwriting it or re-creating it.
fotios will research immediately and send out plans
I've updated the app to include backup and restore functionality. Currently in https://github.com/openshift/li/pull/288
The pull request has been updated to address this issue. This was not a bug, but just an unclear usage.
I've removed the sync feature and replaced it with a push feature which will also do some additional checks.
Checked on devenv_2062, sync action has been replaced by push.
According to the devel's comment, just make the usage clearly.
Mark the bug as verified.
[root@ip-10-114-50-194 status]# bundle exec ./rhc-outage
rhc-outage clear # Clear all issues/updates from this host
rhc-outage help [TASK] # Describe available tasks or one specific task
rhc-outage list # List all issues
rhc-outage new TITLE DESCRIPTION # Start a new issue with and describe what is going on/affected
rhc-outage push # Push this host's status to all other hosts
rhc-outage resolve ISSUE_ID DESCRIPTION # Resolve an issue with a final update. Description is required.
rhc-outage update ISSUE_ID DESCRIPTION # Add an update to an issue without resolving it