there are 2 problems:
1. upgrade.log is created as root:root if runs as vdsm-tool verb (which 
probably performed as root)
2. we need that getLogger during the upgrade scope will use the upgrade handler 
no matter where are we in the code.

for 1- why running this scope as root? can the upgrade part run as vdsm user?
for 2- make separate conf file with only upgrade handler. in that scope each 
getLogger will use the upgrade handler as deafult. after the upgrade scope is 
done, load vdsm.logger.conf again and move on

Yaniv Bronhaim.

----- Original Message -----
> From: "Assaf Muller" <amul...@redhat.com>
> To: "Yaniv Bronheim" <ybron...@redhat.com>
> Cc: "Antoni Segura Puimedon" <asegu...@redhat.com>, "vdsm-devel" 
> <vdsm-de...@fedorahosted.org>
> Sent: Sunday, December 8, 2013 9:47:10 AM
> Subject: Re: [vdsm] Latest master fails to start due to logging
> 
> That has to be it. However, unless there's a bug in the way I add/remove
> handlers in upgrade.py
> (Which there probably is or this error doesn't make any sense) then no VDSM
> code ever outputs to upgrade.log apart from upgrade.py.
> 
> I looked at the code again and it seems correct. I also failed to reproduce
> the error no matter which order I tried
> to start things up. We could solve the error without understanding the issue
> (Which is no fun) and just make sure
> that upgrade.log is created with vdsm:kvm permissions.
> 
> Assaf Muller, Cloud Networking Engineer
> Red Hat
> 
> ----- Original Message -----
> From: "Yaniv Bronheim" <ybron...@redhat.com>
> To: "Assaf Muller" <amul...@redhat.com>
> Cc: "Antoni Segura Puimedon" <asegu...@redhat.com>, "vdsm-devel"
> <vdsm-de...@fedorahosted.org>
> Sent: Sunday, December 8, 2013 2:28:28 AM
> Subject: Re: [vdsm] Latest master fails to start due to logging
> 
> its probably because when you run first the new vdsm-tool command as root,
> you create the upgrade.log as root, and when somewhere in vdsm code you call
> it again , it fails to open the log file as vdsm user. could be?
> 
> ----- Original Message -----
> > From: "Assaf Muller" <amul...@redhat.com>
> > To: "Antoni Segura Puimedon" <asegu...@redhat.com>
> > Cc: "vdsm-devel" <vdsm-de...@fedorahosted.org>
> > Sent: Wednesday, December 4, 2013 1:59:20 PM
> > Subject: Re: [vdsm] Latest master fails to start due to logging
> > 
> > I'm unable to reproduce the issue at this time.
> > 
> > 
> > Assaf Muller, Cloud Networking Engineer
> > Red Hat
> > 
> > ----- Original Message -----
> > From: "Assaf Muller" <amul...@redhat.com>
> > To: "Antoni Segura Puimedon" <asegu...@redhat.com>
> > Cc: "vdsm-devel" <vdsm-de...@fedorahosted.org>
> > Sent: Wednesday, December 4, 2013 12:12:32 PM
> > Subject: Re: [vdsm] Latest master fails to start due to logging
> > 
> > It's due to recent unified net persistence patches that were merged
> > yesterday.
> > 
> > If you change the persistence model to ifcfg it shouldn't happen.
> > Alternatively
> > you can:
> > touch /var/lib/vdsm/upgrade/UnifiedPersistence
> > 
> > And the upgrade won't run even if you're using unified persistence and VDSM
> > will boot.
> > 
> > I'll look into why this is happening and send a patch today.
> > 
> > Assaf Muller, Cloud Networking Engineer
> > Red Hat
> > 
> > ----- Original Message -----
> > From: "Antoni Segura Puimedon" <asegu...@redhat.com>
> > To: "vdsm-devel" <vdsm-de...@fedorahosted.org>
> > Sent: Wednesday, December 4, 2013 12:05:20 PM
> > Subject: [vdsm] Latest master fails to start due to logging
> > 
> > Hi List,
> > 
> > I just upgraded my testing vdsm to the new master and vdsmd fails to go
> > up due to:
> > 
> >     [vdsm@nx01]~% /usr/share/vdsm/vdsm
> >     Traceback (most recent call last):
> >       File "/usr/share/vdsm/vdsm", line 175, in <module>
> >         run(**argDict)
> >       File "/usr/share/vdsm/vdsm", line 67, in run
> >         lconfig.fileConfig(loggerConfFile)
> >       File "/usr/lib64/python2.7/logging/config.py", line 78, in fileConfig
> >         handlers = _install_handlers(cp, formatters)
> >       File "/usr/lib64/python2.7/logging/config.py", line 156, in
> >       _install_handlers
> >         h = klass(*args)
> >       File "/usr/lib64/python2.7/logging/handlers.py", line 392, in
> >       __init__
> >         logging.FileHandler.__init__(self, filename, mode, encoding, delay)
> >       File "/usr/lib64/python2.7/logging/__init__.py", line 902, in
> >       __init__
> >         StreamHandler.__init__(self, self._open())
> >       File "/usr/lib64/python2.7/logging/__init__.py", line 925, in _open
> >         stream = open(self.baseFilename, self.mode)
> >     IOError: [Errno 13] Permission denied: '/var/log/vdsm/upgrade.log'
> > 
> > I'd appreciate it if somebody could point me if there is a known patch for
> > that
> > 
> > Best,
> > 
> > Toni
> > _______________________________________________
> > vdsm-devel mailing list
> > vdsm-devel@lists.fedorahosted.org
> > https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel
> > _______________________________________________
> > vdsm-devel mailing list
> > vdsm-devel@lists.fedorahosted.org
> > https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel
> > _______________________________________________
> > vdsm-devel mailing list
> > vdsm-devel@lists.fedorahosted.org
> > https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel
> > 
> 
_______________________________________________
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel

Reply via email to