Unknown Power State after libvirtd restart

Hi,
I'm starting using Foreman to provision and manage hosts on a separate KVM
machine, and it happens that if I restart libvirtd, even while no host is
active, then Foreman "loses the connection" with libvirt and reports the
hosts as being in "Unknown Power State".
I need to restart Foreman to fix this, and then the first connection to
Foreman's web GUI after the restart is slow.
This is a bit annoying.

Is it normal behaviour?
Can it be prevented somehow?

Thanks.
Marco

I'd try to close all browsers before restarting libvirtd, it might force
the connection to be opened while restarting libvirtd. Also, libvirt
daemon is changing firewall configuration when (re)starting, check that
too.

LZ

··· On Tue, Nov 19, 2013 at 02:25:28AM -0800, zerozerounouno@gmail.com wrote: > Hi, > I'm starting using Foreman to provision and manage hosts on a separate KVM > machine, and it happens that if I restart libvirtd, even while no host is > active, then Foreman "loses the connection" with libvirt and reports the > hosts as being in "Unknown Power State". > I need to restart Foreman to fix this, and then the first connection to > Foreman's web GUI after the restart is slow. > This is a bit annoying. > > Is it normal behaviour? > Can it be prevented somehow? > > Thanks. > Marco > > -- > You received this message because you are subscribed to the Google Groups "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/groups/opt_out.


Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

I'd try to close all browsers before restarting libvirtd, it might force
> the connection to be opened while restarting libvirtd. Also, libvirt
>

Well… restarting the browser could be even more annoying than restarting
Foreman, actually ;).

daemon is changing firewall configuration when (re)starting, check that
> too.
>

Yes I know, but libvirt's firewall rules were already in place before the
restart of the daemon.
Moreover, if it was a firewall problem on the KVM host then the workaround
by restarting Foreman on the other machine wouldn't make much sense IMHO.

Thank you.
Marco

··· On Tuesday, November 19, 2013 12:43:53 PM UTC+1, Lukas Zapletal wrote:

Yeah, I meant closing all Foreman-related tabs.

Not sure what is causing this, sorry.

··· -- Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

Yeah, I meant closing all Foreman-related tabs.

Well, this actually did not work… not in Chrome on OSX, at least.
After closing the only Foreman tab I had open, I opened a new tab, typed
the Foreman server address, was automatically logged in, and the host was
still in "Unknown Power State".
I also tried logging out before closing the tab, and then logging in again
in the new tab, but the result was the same.

Thanks.
Marco

··· On Wednesday, November 20, 2013 12:31:41 PM UTC+1, Lukas Zapletal wrote:

>
>> Yeah, I meant closing all Foreman-related tabs.
>
>
> Well, this actually did not work… not in Chrome on OSX, at least.
> After closing the only Foreman tab I had open, I opened a new tab, typed the
> Foreman server address, was automatically logged in, and the host was still
> in "Unknown Power State".
> I also tried logging out before closing the tab, and then logging in again
> in the new tab, but the result was the same.

Looking at the code, it should handle failures correctly, do you get
an actual error in the logs/anywhere?

thanks,
Ohad

··· On Wed, Nov 20, 2013 at 5:12 PM, wrote: > On Wednesday, November 20, 2013 12:31:41 PM UTC+1, Lukas Zapletal wrote: > > Thanks. > Marco > > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/groups/opt_out.

Hi,
no, I don't see any errors in Foreman's log or in /var/log/messages.
Should I look elsewhere?
Also libvirt logs on the virtualization host show nothing special.

Thanks.
Marco

··· On Wednesday, November 20, 2013 4:16:32 PM UTC+1, ohad wrote:

Looking at the code, it should handle failures correctly, do you get
an actual error in the logs/anywhere?