Bug 846041 - "rhc-outage sync" pushes blindly to other hosts, doesn't sync from other hosts,
"rhc-outage sync" pushes blindly to other hosts, doesn't sync from other hosts,
Product: OpenShift Origin
Classification: Red Hat
Component: Website (Show other bugs)
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Fotios Lindiakos
libra bugs
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-08-06 11:56 EDT by Matt Woodson
Modified: 2015-05-14 21:13 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-09-17 17:30:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Matt Woodson 2012-08-06 11:56:12 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:

[root@ex-srv1.prod status]# bundle exec ./rhc-outage sync
Syncing https://ex-srv2.prod.rhcloud.com/app/status
Syncing https://ex-srv3.prod.rhcloud.com/app/status
Syncing https://ex-srv4.prod.rhcloud.com/app/status

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.

How reproducible:

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

Actual results:

on ex-srv2 that the db is now blank.

Expected results:

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.

Additional info:

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.
Comment 1 John Poelstra 2012-08-21 13:24:21 EDT
fotios will research immediately and send out plans
Comment 2 Fotios Lindiakos 2012-08-21 16:38:52 EDT
I've updated the app to include backup and restore functionality. Currently in https://github.com/openshift/li/pull/288
Comment 3 Fotios Lindiakos 2012-08-22 14:02:08 EDT
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.
Comment 4 Meng Bo 2012-08-23 05:21:45 EDT
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

Note You need to log in before you can comment on or make changes to this bug.