Re: [ovirt-users] oVirt hosted engine agent and broker duplicate logs to syslog

2016-01-02 Thread Aleksey Chudov
Thank you for the answer.

So, currently there is at least three copy of agent and broker logs on
centos 7.2:
1. agent.log and broker.log files in /var/log/ovirt-hosted-engine-ha/
directory
2. /var/log/messages file
3. journald database

Does errors additionally send to syslog according to agent-log.conf and
broker-log.conf files in /etc/ovirt-hosted-engine-ha/ directory?

It's a bit too much :) Do you plan to fix this duplication?

For example 2. and 3. can be quickly disabled by adding StandardOutput=null
option to unit file

[Service]
...
StandardOutput=null

On Sat, Jan 2, 2016 at 2:01 PM, Simone Tiraboschi <stira...@redhat.com>
wrote:

>
> Il 31/Dic/2015 16:36, "Aleksey Chudov" <aleksey.chu...@gmail.com> ha
> scritto:
> >
> > Hi,
> >
> > After upgrade from 3.6.0 to 3.6.1 agent and broker duplicate their logs
> to syslog. So, the same messages logged twice to files in
> /var/log/ovirt-hosted-engine-ha/ directory and to /var/log/messages file.
> >
> > Agent and broker configuration files remain the same for 3.5, 3.6.0 and
> 3.6.1 and there is not such logs duplication in 3.5 and 3.6.0.
> >
> > Is it a bug or expected behavior?
>
> I think that it's an expected behavior: for 3.6.1 we had to rewrite the
> systemd startup script due to a slightly different behavior on centos 7.2.
> Prior than that the agent was forking as a daemon while now it's running
> as a systemd service with type=simple so its output goes to systemd logging
> facilities and so also in /var/log/messages according to your system
> configuration.
>
> >
> > OS is CentOS 7.2
> >
> > # rpm -qa 'ovirt*'
> > ovirt-vmconsole-1.0.0-1.el7.centos.noarch
> > ovirt-vmconsole-host-1.0.0-1.el7.centos.noarch
> > ovirt-host-deploy-1.4.1-1.el7.centos.noarch
> > ovirt-hosted-engine-ha-1.3.3.5-1.el7.centos.noarch
> > ovirt-engine-sdk-python-3.6.0.3-1.el7.centos.noarch
> > ovirt-release36-002-2.noarch
> > ovirt-setup-lib-1.0.0-1.el7.centos.noarch
> > ovirt-hosted-engine-setup-1.3.1.3-1.el7.centos.noarch
> >
> >
> > # cat /etc/ovirt-hosted-engine-ha/agent-log.conf
> > [loggers]
> > keys=root
> >
> > [handlers]
> > keys=syslog,logfile
> >
> > [formatters]
> > keys=long,sysform
> >
> > [logger_root]
> > level=INFO
> > handlers=syslog,logfile
> > propagate=0
> >
> > [handler_syslog]
> > level=ERROR
> > class=handlers.SysLogHandler
> > formatter=sysform
> > args=('/dev/log', handlers.SysLogHandler.LOG_USER)
> >
> > [handler_logfile]
> > class=logging.handlers.TimedRotatingFileHandler
> > args=('/var/log/ovirt-hosted-engine-ha/agent.log', 'd', 1, 7)
> > level=DEBUG
> > formatter=long
> >
> > [formatter_long]
> >
> format=%(threadName)s::%(levelname)s::%(asctime)s::%(module)s::%(lineno)d::%(name)s::(%(funcName)s)
> %(message)s
> >
> > [formatter_sysform]
> > format=ovirt-ha-agent %(name)s %(levelname)s %(message)s
> > datefmt=
> >
> >
> > Aleksey
> >
> > ___
> > Users mailing list
> > Users@ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/users
> >
>
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] oVirt hosted engine agent and broker duplicate logs to syslog

2015-12-31 Thread Aleksey Chudov
Hi,

After upgrade from 3.6.0 to 3.6.1 agent and broker duplicate their logs to
syslog. So, the same messages logged twice to files in
/var/log/ovirt-hosted-engine-ha/ directory and to /var/log/messages file.

Agent and broker configuration files remain the same for 3.5, 3.6.0 and
3.6.1 and there is not such logs duplication in 3.5 and 3.6.0.

Is it a bug or expected behavior?

OS is CentOS 7.2

# rpm -qa 'ovirt*'
ovirt-vmconsole-1.0.0-1.el7.centos.noarch
ovirt-vmconsole-host-1.0.0-1.el7.centos.noarch
ovirt-host-deploy-1.4.1-1.el7.centos.noarch
ovirt-hosted-engine-ha-1.3.3.5-1.el7.centos.noarch
ovirt-engine-sdk-python-3.6.0.3-1.el7.centos.noarch
ovirt-release36-002-2.noarch
ovirt-setup-lib-1.0.0-1.el7.centos.noarch
ovirt-hosted-engine-setup-1.3.1.3-1.el7.centos.noarch


# cat /etc/ovirt-hosted-engine-ha/agent-log.conf
[loggers]
keys=root

[handlers]
keys=syslog,logfile

[formatters]
keys=long,sysform

[logger_root]
level=INFO
handlers=syslog,logfile
propagate=0

[handler_syslog]
level=ERROR
class=handlers.SysLogHandler
formatter=sysform
args=('/dev/log', handlers.SysLogHandler.LOG_USER)

[handler_logfile]
class=logging.handlers.TimedRotatingFileHandler
args=('/var/log/ovirt-hosted-engine-ha/agent.log', 'd', 1, 7)
level=DEBUG
formatter=long

[formatter_long]
format=%(threadName)s::%(levelname)s::%(asctime)s::%(module)s::%(lineno)d::%(name)s::(%(funcName)s)
%(message)s

[formatter_sysform]
format=ovirt-ha-agent %(name)s %(levelname)s %(message)s
datefmt=


Aleksey
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] Wrong nvidia drivers dependency for ovirt-hosted-engine-setup on CentOS 7.2

2015-12-28 Thread Aleksey Chudov
Hi,

I have installed package
ovirt-hosted-engine-setup-1.3.1.4-1.el7.centos.noarch on CentOS 7.2 and
nvidia drivers installed as dependencies. If I manually try to remove
nvidia drivers yum proposes to remove ovirt packages as well. I don't have
any nvidia devices in my servers so I consider this a dependency bug.
Please check the output below.


# rpm -qa '*nvidia*' '*ovirt*'
nvidia-x11-drv-352.63-1.el7.elrepo.x86_64
ovirt-host-deploy-1.4.1-1.el7.centos.noarch
yum-plugin-nvidia-1.0.2-1.el7.elrepo.noarch
libgovirt-0.3.3-1.el7.x86_64
kmod-nvidia-352.63-1.el7.elrepo.x86_64
ovirt-release36-002-2.noarch
ovirt-engine-sdk-python-3.6.0.3-1.el7.centos.noarch
ovirt-hosted-engine-ha-1.3.3.6-1.el7.centos.noarch
ovirt-vmconsole-1.0.0-1.el7.centos.noarch
ovirt-vmconsole-host-1.0.0-1.el7.centos.noarch
ovirt-setup-lib-1.0.0-1.el7.centos.noarch
ovirt-hosted-engine-setup-1.3.1.4-1.el7.centos.noarch


# rpm -qa | grep nvidia | xargs yum history info
Loaded plugins: fastestmirror, nvidia
[nvidia]: No NVIDIA display devices found
Transaction ID : 18
Begin time : Thu Dec 24 14:14:14 2015
Begin rpmdb: 429:07df3601154cf590c9c5c0435c6dd92b88beb824
End time   :14:18:53 2015 (279 seconds)
End rpmdb  : 697:c3c9771baf9f1abe81798d792470334cf2eb8ba6
User   : root 
Return-Code: Success
Command Line   : -d 2 -y install ovirt-hosted-engine-setup
Transaction performed with:
Installed rpm-4.11.3-17.el7.x86_64  @anaconda
Installed yum-3.4.3-132.el7.centos.0.1.noarch   @anaconda
Installed yum-plugin-fastestmirror-1.1.31-34.el7.noarch @anaconda
Packages Altered:
...
Dep-Install
kmod-nvidia-352.63-1.el7.elrepo.x86_64   @elrepo
...
Dep-Install
nvidia-x11-drv-352.63-1.el7.elrepo.x86_64@elrepo
...
Install
ovirt-hosted-engine-setup-1.3.1.4-1.el7.centos.noarch@ovirt-3.6
...
Dep-Install
yum-plugin-nvidia-1.0.2-1.el7.elrepo.noarch  @elrepo
Scriptlet output:
   1 depmod: WARNING: could not open
/lib/modules/3.10.0-229.el7.x86_64/modules.order: No such file or directory
   2 depmod: WARNING: could not open
/lib/modules/3.10.0-229.el7.x86_64/modules.builtin: No such file or
directory
   3 gtk-query-immodules-2.0-64: error while loading shared libraries:
libpangocairo-1.0.so.0: cannot open shared object file: No such file or
directory
   4 warning: %post(gtk2-2.24.28-8.el7.x86_64) scriptlet failed, exit
status 127
   5 gtk-query-immodules-3.0-64: error while loading shared libraries:
libEGL.so.1: cannot open shared object file: No such file or directory
   6 Working. This may take some time ...
   7 Done.
history info



Regards,
Aleksey
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] ERROR: update or delete on table "luns" violates foreign key constraint...

2015-12-22 Thread Aleksey Chudov
First time I've seen the problem version was
ovirt-engine-3.6.0.3-1.el7.centos.noarch. Current version is
ovirt-engine-3.6.1.3-1.el7.centos.noarch and error persists.

On Tue, Dec 22, 2015 at 10:15 AM, Roy Golan <rgo...@redhat.com> wrote:

>
>
> On Sun, Dec 20, 2015 at 12:28 PM, Eli Mesika <emes...@redhat.com> wrote:
>
>>
>>
>> - Original Message -
>> > From: "Aleksey Chudov" <aleksey.chu...@gmail.com>
>> > To: users@ovirt.org
>> > Sent: Friday, December 18, 2015 11:38:21 AM
>> > Subject: [ovirt-users] ERROR: update or delete on table "luns"
>> violates   foreign key constraint...
>> >
>> > Hi,
>> >
>> > I have two-node self hosted engine cluster with iscsi shared storage.
>> Every
>> > ovirt-engine restart produces the following error in
>> > /var/log/ovirt-engine/engine.log. After that engine works without any
>> > problems.
>> >
>> > How to fix it?
>>
>>
> Aleksey what's the engine version?
>
>
>> CCing Allon M
>>
>> This seems as a bug
>>
>> disk_lun_map FK is created without ON DELETE/UPDATE CASCADE
>> This makes the FK failing in deleting from the luns table (by calling
>> DeleteLun) while the deleted lun in the parent table has references in
>> disk_lun_map
>>
>> Allon, please advice
>>
>> >
>> > 2015-12-18 11:33:00,053 ERROR
>> >
>> [org.ovirt.engine.core.bll.storage.SyncLunsInfoForBlockStorageDomainCommand]
>> > (org.ovirt.thread.pool-8-thread-11) [674068d8] Command
>> >
>> 'org.ovirt.engine.core.bll.storage.SyncLunsInfoForBlockStorageDomainCommand'
>> > failed: CallableStatementCallback; SQL [{call deletelun(?)}]; ERROR:
>> update
>> > or delete on table "luns" violates foreign key constraint
>> > "disk_lun_to_lun_fk" on table "disk_lun_map"
>> > Detail: Key (lun_id)=(36001405821da830526f48d0a961767c8) is still
>> referenced
>> > from table "disk_lun_map".
>> > Where: SQL statement "DELETE FROM LUNs
>> > WHERE LUN_id = v_LUN_id"
>> > PL/pgSQL function deletelun(character varying) line 10 at SQL statement;
>> > nested exception is org.postgresql.util.PSQLException: ERROR: update or
>> > delete on table "luns" violates foreign key constraint
>> "disk_lun_to_lun_fk"
>> > on table "disk_lun_map"
>> > Detail: Key (lun_id)=(36001405821da830526f48d0a961767c8) is still
>> referenced
>> > from table "disk_lun_map".
>> > Where: SQL statement "DELETE FROM LUNs
>> > WHERE LUN_id = v_LUN_id"
>> > PL/pgSQL function deletelun(character varying) line 10 at SQL statement
>> > 2015-12-18 11:33:00,053 ERROR
>> >
>> [org.ovirt.engine.core.bll.storage.SyncLunsInfoForBlockStorageDomainCommand]
>> > (org.ovirt.thread.pool-8-thread-11) [674068d8] Exception:
>> > org.springframework.dao.DataIntegrityViolationException:
>> > CallableStatementCallback; SQL [{call deletelun(?)}]; ERROR: update or
>> > delete on table "luns" violates foreign key constraint
>> "disk_lun_to_lun_fk"
>> > on table "disk_lun_map"
>> > Detail: Key (lun_id)=(36001405821da830526f48d0a961767c8) is still
>> referenced
>> > from table "disk_lun_map".
>> > Where: SQL statement "DELETE FROM LUNs
>> > WHERE LUN_id = v_LUN_id"
>> > PL/pgSQL function deletelun(character varying) line 10 at SQL statement;
>> > nested exception is org.postgresql.util.PSQLException: ERROR: update or
>> > delete on table "luns" violates foreign key constraint
>> "disk_lun_to_lun_fk"
>> > on table "disk_lun_map"
>> > Detail: Key (lun_id)=(36001405821da830526f48d0a961767c8) is still
>> referenced
>> > from table "disk_lun_map".
>> > Where: SQL statement "DELETE FROM LUNs
>> > WHERE LUN_id = v_LUN_id"
>> > PL/pgSQL function deletelun(character varying) line 10 at SQL statement
>> > at
>> >
>> org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:245)
>> > [spring-jdbc.jar:3.1.1.RELEASE]
>> > at
>> >
>> org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
>> > [spring-jdbc.jar:3.1.1.RELEASE]
>> > at
>> org.springframework.jdbc.core.J

[ovirt-users] ERROR: update or delete on table "luns" violates foreign key constraint...

2015-12-18 Thread Aleksey Chudov
Hi,

I have two-node self hosted engine cluster with iscsi shared storage. Every
ovirt-engine restart produces the following error in
/var/log/ovirt-engine/engine.log. After that engine works without any
problems.

How to fix it?

2015-12-18 11:33:00,053 ERROR
[org.ovirt.engine.core.bll.storage.SyncLunsInfoForBlockStorageDomainCommand]
(org.ovirt.thread.pool-8-thread-11) [674068d8] Command
'org.ovirt.engine.core.bll.storage.SyncLunsInfoForBlockStorageDomainCommand'
failed: CallableStatementCallback; SQL [{call deletelun(?)}]; ERROR: update
or delete on table "luns" violates foreign key constraint
"disk_lun_to_lun_fk" on table "disk_lun_map"
  Detail: Key (lun_id)=(36001405821da830526f48d0a961767c8) is still
referenced from table "disk_lun_map".
  Where: SQL statement "DELETE FROM LUNs
   WHERE LUN_id = v_LUN_id"
PL/pgSQL function deletelun(character varying) line 10 at SQL statement;
nested exception is org.postgresql.util.PSQLException: ERROR: update or
delete on table "luns" violates foreign key constraint "disk_lun_to_lun_fk"
on table "disk_lun_map"
  Detail: Key (lun_id)=(36001405821da830526f48d0a961767c8) is still
referenced from table "disk_lun_map".
  Where: SQL statement "DELETE FROM LUNs
   WHERE LUN_id = v_LUN_id"
PL/pgSQL function deletelun(character varying) line 10 at SQL statement
2015-12-18 11:33:00,053 ERROR
[org.ovirt.engine.core.bll.storage.SyncLunsInfoForBlockStorageDomainCommand]
(org.ovirt.thread.pool-8-thread-11) [674068d8] Exception:
org.springframework.dao.DataIntegrityViolationException:
CallableStatementCallback; SQL [{call deletelun(?)}]; ERROR: update or
delete on table "luns" violates foreign key constraint "disk_lun_to_lun_fk"
on table "disk_lun_map"
  Detail: Key (lun_id)=(36001405821da830526f48d0a961767c8) is still
referenced from table "disk_lun_map".
  Where: SQL statement "DELETE FROM LUNs
   WHERE LUN_id = v_LUN_id"
PL/pgSQL function deletelun(character varying) line 10 at SQL statement;
nested exception is org.postgresql.util.PSQLException: ERROR: update or
delete on table "luns" violates foreign key constraint "disk_lun_to_lun_fk"
on table "disk_lun_map"
  Detail: Key (lun_id)=(36001405821da830526f48d0a961767c8) is still
referenced from table "disk_lun_map".
  Where: SQL statement "DELETE FROM LUNs
   WHERE LUN_id = v_LUN_id"
PL/pgSQL function deletelun(character varying) line 10 at SQL statement
at
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:245)
[spring-jdbc.jar:3.1.1.RELEASE]
at
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
[spring-jdbc.jar:3.1.1.RELEASE]
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1030)
[spring-jdbc.jar:3.1.1.RELEASE]
at
org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:1064)
[spring-jdbc.jar:3.1.1.RELEASE]
at
org.springframework.jdbc.core.simple.AbstractJdbcCall.executeCallInternal(AbstractJdbcCall.java:388)
[spring-jdbc.jar:3.1.1.RELEASE]
at
org.springframework.jdbc.core.simple.AbstractJdbcCall.doExecute(AbstractJdbcCall.java:351)
[spring-jdbc.jar:3.1.1.RELEASE]
at
org.springframework.jdbc.core.simple.SimpleJdbcCall.execute(SimpleJdbcCall.java:181)
[spring-jdbc.jar:3.1.1.RELEASE]
at
org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeImpl(SimpleJdbcCallsHandler.java:147)
[dal.jar:]
at
org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeImpl(SimpleJdbcCallsHandler.java:142)
[dal.jar:]
at
org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeModification(SimpleJdbcCallsHandler.java:80)
[dal.jar:]
at org.ovirt.engine.core.dao.LunDaoImpl.remove(LunDaoImpl.java:127)
[dal.jar:]
at org.ovirt.engine.core.dao.LunDaoImpl.remove(LunDaoImpl.java:18)
[dal.jar:]
at
org.ovirt.engine.core.bll.storage.SyncLunsInfoForBlockStorageDomainCommand.refreshLunsInfo(SyncLunsInfoForBlockStorageDomainCommand.java:94)
[bll.jar:]
at
org.ovirt.engine.core.bll.storage.SyncLunsInfoForBlockStorageDomainCommand$1.runInTransaction(SyncLunsInfoForBlockStorageDomainCommand.java:51)
[bll.jar:]
at
org.ovirt.engine.core.bll.storage.SyncLunsInfoForBlockStorageDomainCommand$1.runInTransaction(SyncLunsInfoForBlockStorageDomainCommand.java:48)
[bll.jar:]
at
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:210)
[utils.jar:]
at
org.ovirt.engine.core.bll.storage.SyncLunsInfoForBlockStorageDomainCommand.executeCommand(SyncLunsInfoForBlockStorageDomainCommand.java:48)
[bll.jar:]
at
org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:1215)
[bll.jar:]
at
org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:1359)
[bll.jar:]
at