Bug 1188143 - [RFE] - engine-backup should notify via event on backup start\completion\failure with log path.
Summary: [RFE] - engine-backup should notify via event on backup start\completion\fail...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-installer
Version: 3.5
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
: 3.6.0
Assignee: Yedidyah Bar David
QA Contact: Gonza
URL: http://www.ovirt.org/Features/BackupA...
Whiteboard: integration
: 1188124 1188140 (view as bug list)
Depends On:
Blocks: 1188119 1188127 1188136 1188144
TreeView+ depends on / blocked
 
Reported: 2015-02-02 07:26 UTC by Yaniv Lavi
Modified: 2015-11-04 11:32 UTC (History)
13 users (show)

Fixed In Version: ovirt-3.6.0-alpha1.2
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-04 11:32:49 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 40128 0 master MERGED packaging: engine-backup: notify engine Never

Description Yaniv Lavi 2015-02-02 07:26:37 UTC
Description of problem:
engine-backup should notify via event on backup start\completion, so admin will be aware backup is running.

Comment 1 Yaniv Lavi 2015-03-22 15:30:10 UTC
The engine-backup procedure should add events straight to the database either on success, or on failure (no need for "started" as the backup process should be fast, even on large datacenters). The failure/success should come with a message as well, that will be put in the events table, and should contain the message (with the log path, for example).

Comment 2 Yaniv Lavi 2015-03-22 15:30:40 UTC
*** Bug 1188140 has been marked as a duplicate of this bug. ***

Comment 3 Yaniv Lavi 2015-03-22 15:32:35 UTC
(In reply to Yaniv Dary from comment #1)
> The engine-backup procedure should add events straight to the database
> either on success, or on failure (no need for "started" as the backup
> process should be fast, even on large datacenters). The failure/success
> should come with a message as well, that will be put in the events table,
> and should contain the message (with the log path, for example).

This is Oved note on this. I would still add start event and have a completion\failure with log location in the event.

Comment 4 Doron Fediuck 2015-04-12 10:25:37 UTC
Oved,
can you please add the relevant events to the wiki page?

Comment 5 Eli Mesika 2015-04-12 11:09:11 UTC
see
www.ovirt.org/Features/BackupAwareness
 Interface to engine-backup 
 Events Raised

Comment 6 Yedidyah Bar David 2015-04-20 09:45:39 UTC
Some questions:

1. Should engine-backup do something different for this bug and for bug 1188124? Or just call LogEngineBackupEvent (once at start, once at end - either successful or failed) for both of them? Just close one as a duplicate of the other?

2. This bug asks for the log path. Where should it be written? Perhaps add a column for this?

3. What's the 'db_name' for? Is this the engine's database name? In particular, if it backs up also dwh/reports (and files), do we want this logged? Separately?

Comment 7 Eli Mesika 2015-04-20 13:02:18 UTC
(In reply to Yedidyah Bar David from comment #6)
> Some questions:
> 
> 1. Should engine-backup do something different for this bug and for bug
> 1188124? Or just call LogEngineBackupEvent (once at start, once at end -
> either successful or failed) for both of them? Just close one as a duplicate
> of the other?

Yes, please close as duplicate 

> 
> 2. This bug asks for the log path. Where should it be written? Perhaps add a
> column for this?


Please elaborate, if there is any log it is the engine-backup log, I see no other log involved 

> 
> 3. What's the 'db_name' for? Is this the engine's database name? In
> particular, if it backs up also dwh/reports (and files), do we want this
> logged? Separately?

db_name currently is 'engine' or whatever will be decided in order to recognize DWH backups , we added this to support this feature also on history backups so it is not related to the real database name

Comment 8 Yedidyah Bar David 2015-04-20 13:27:18 UTC
*** Bug 1188124 has been marked as a duplicate of this bug. ***

Comment 9 Yedidyah Bar David 2015-04-20 13:42:58 UTC
(In reply to Eli Mesika from comment #7)
> (In reply to Yedidyah Bar David from comment #6)
> > Some questions:
> > 
> > 1. Should engine-backup do something different for this bug and for bug
> > 1188124? Or just call LogEngineBackupEvent (once at start, once at end -
> > either successful or failed) for both of them? Just close one as a duplicate
> > of the other?
> 
> Yes, please close as duplicate 

Done, thanks

> 
> > 
> > 2. This bug asks for the log path. Where should it be written? Perhaps add a
> > column for this?
> 
> 
> Please elaborate, if there is any log it is the engine-backup log, I see no
> other log involved 

Yes, the log of engine-backup. We want to log it. Where?

> 
> > 
> > 3. What's the 'db_name' for? Is this the engine's database name? In
> > particular, if it backs up also dwh/reports (and files), do we want this
> > logged? Separately?
> 
> db_name currently is 'engine' or whatever will be decided in order to
> recognize DWH backups , we added this to support this feature also on
> history backups so it is not related to the real database name

We already support dwh/reports in engine-backup, but it was not requested to monitor them, see bug 1188119 comment 3 and later.

So currently just log the engine's db backup with the fixed string 'engine'?

Comment 10 Eli Mesika 2015-04-20 13:51:22 UTC
(In reply to Yedidyah Bar David from comment #9)
> Yes, the log of engine-backup. We want to log it. Where?

In the same place you log without this feature , why it should be changed ?

> 

> So currently just log the engine's db backup with the fixed string 'engine'?

Right

Comment 11 Yedidyah Bar David 2015-04-26 14:03:51 UTC
Current status of the patch [1]:

1. It always notifies on backup start and finish, regardless of scope (see bug 1188119 comment 6).

2. It always notifies only status, log file full path, and time (and the string 'engine'). Never anything else, including error messages, scope, etc. These all can be found in the log file.

AFAIAC it's ready.

I'd personally prefer to pass more data, including scope, error message etc., but this requires doing some (what seems to be) significant changes in the db/interface/engine, so can probably wait.

Comments are welcome, here or in gerrit.

[1] https://gerrit.ovirt.org/40128

Comment 12 Eli Mesika 2015-04-26 14:37:22 UTC
(In reply to Yedidyah Bar David from comment #11)

> I'd personally prefer to pass more data, including scope, error message
> etc., but this requires doing some (what seems to be) significant changes in
> the db/interface/engine, so can probably wait.
Didi, if we will decide to add the log path, I would like to add any other required field in the same phase since it will take me less time to add whatever we need instead of adding any other additional fields in future 

What other fields except of the log path do you think we should add ???

Comment 13 Yedidyah Bar David 2015-04-28 17:17:43 UTC
In a private discussion we agreed to:

1) add a field log_path - this will be the full path to the log file

2) add a field fqdn - fqdn of the host running engine-backup (and therefore having the log file).

Note that a remote machine might or might not be able to update the engine db, so this cannot be relied upon currently for monitoring backups of remote dwh/reports. Specifically a Reports-only machine does not have access to the engine db.

3) rename db_name to scope, can be one of the following values {db,dwhdb,reportsdb,files}

We will save a record per scope , that means that if db and files were backed up, two call for LogEngineBackupEvent will be issues one with 'db' as scope and one with 'files' as scope.

Setting needinfo on Eli for code update of db side...

Comment 15 Yedidyah Bar David 2015-05-05 13:06:37 UTC
set doc text -, we have a feature page for this

Comment 16 Gonza 2015-06-26 15:11:10 UTC
Verified with:
ovirt-engine-3.6.0-0.0.master.20150623052342.gita7865c8.el6.noarch

According to what's described in http://www.ovirt.org/Features/BackupAwareness messages for start/finish/failure of engine-backup are displayed under event log.

Comment 17 Sandro Bonazzola 2015-11-04 11:32:49 UTC
oVirt 3.6.0 has been released on November 4th, 2015 and should fix this issue.
If problems still persist, please open a new BZ and reference this one.


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