From aclement at linagora.com Tue Jun 1 13:56:01 2010 From: aclement at linagora.com (Arthur =?iso-8859-1?q?Cl=E9ment?=) Date: Tue, 1 Jun 2010 15:56:01 +0200 Subject: [Ovirt-devel] Host-register crash Message-ID: <201006011556.01217.aclement@linagora.com> I found that ovirt-host-register crashes very quickly and my node was unable to register. This is the trace when I launch it in debug and no daemon mode : ================================================================================ /usr/share/ovirt-server/host-browser/host-register.rb -d -n /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement INFO Tue Jun 01 15:02:28 +0200 2010 (2796) hostregister started. INFO Tue Jun 01 15:02:28 +0200 2010 (2796) Connecting to amqp://ovirt.admin.virt.par.lng:5672 Console Connection Established... Agent 1.0.connected! Marking objects for agent 1.0 active host_list length is 0 Agent 1.19.connected! Marking objects for agent 1.19 active ===== Current Objects ===== ===== Done ===== ===== Current Objects ===== ===== Done ===== ===== Current Objects ===== ===== Done ===== ===== Current Objects ===== ===== Done ===== ===== Current Objects ===== ===== Done ===== Exception caught in callback: Timed out waiting for response /usr/lib/ruby/site_ruby/1.8/qmf.rb:993:in `objects' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/site_ruby/1.8/qmf.rb:986:in `objects' /usr/share/ovirt-server/host-browser/host-register.rb:146:in `agent_added' /usr/lib/ruby/site_ruby/1.8/qmf.rb:1064:in `do_console_events' /usr/lib/ruby/site_ruby/1.8/qmf.rb:1047:in `run_cb_thread' /usr/lib/ruby/site_ruby/1.8/qmf.rb:884:in `initialize' /usr/lib/ruby/site_ruby/1.8/qmf.rb:883:in `new' /usr/lib/ruby/site_ruby/1.8/qmf.rb:883:in `initialize' /usr/share/ovirt-server/host-browser/host-register.rb:107:in `new' /usr/share/ovirt-server/host-browser/host-register.rb:107:in `initialize' /usr/share/ovirt-server/host-browser/host-register.rb:479:in `new' /usr/share/ovirt-server/host-browser/host-register.rb:479:in `main' /usr/share/ovirt-server/host-browser/host-register.rb:483 Agent 1.23.connected! Marking objects for agent 1.23 active ===== Current Objects ===== ===== Done ===== ===== Current Objects ===== ===== Done ===== ===== Current Objects ===== ===== Done ===== ===== Current Objects ===== ===== Done ===== ===== Current Objects ===== ===== Done ===== ===== Current Objects ===== ===== Done ===== Exception caught in callback: Timed out waiting for response /usr/lib/ruby/site_ruby/1.8/qmf.rb:993:in `objects' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/site_ruby/1.8/qmf.rb:986:in `objects' /usr/share/ovirt-server/host-browser/host-register.rb:146:in `agent_added' /usr/lib/ruby/site_ruby/1.8/qmf.rb:1064:in `do_console_events' /usr/lib/ruby/site_ruby/1.8/qmf.rb:1047:in `run_cb_thread' /usr/lib/ruby/site_ruby/1.8/qmf.rb:884:in `initialize' /usr/lib/ruby/site_ruby/1.8/qmf.rb:883:in `new' /usr/lib/ruby/site_ruby/1.8/qmf.rb:883:in `initialize' /usr/share/ovirt-server/host-browser/host-register.rb:107:in `new' /usr/share/ovirt-server/host-browser/host-register.rb:107:in `initialize' /usr/share/ovirt-server/host-browser/host-register.rb:479:in `new' /usr/share/ovirt-server/host-browser/host-register.rb:479:in `main' /usr/share/ovirt-server/host-browser/host-register.rb:483 Agent 1.24.connected! Marking objects for agent 1.24 active ===== Current Objects ===== ===== Done ===== ===== Current Objects ===== ===== Done ===== ===== Current Objects ===== ===== Done ===== ===== Current Objects ===== ===== Done ===== ===== Current Objects ===== ===== Done ===== ===== Current Objects ===== ===== Done ===== Exception caught in callback: Timed out waiting for response /usr/lib/ruby/site_ruby/1.8/qmf.rb:236: [BUG] Segmentation fault ruby 1.8.6 (2010-02-05) [x86_64-linux] Aborted ===================================================================================== a nasty part from/var/log/messages : Jun 1 15:02:38 ovirt qpidd[1595]: 2010-06-01 15:02:38 warning Management Agent received invalid schema response: com.redhat.matahari.cpu Jun 1 15:02:38 ovirt qpidd[1595]: 2010-06-01 15:02:38 warning Management Agent received invalid schema response: com.redhat.matahari.host Jun 1 15:02:38 ovirt qpidd[1595]: 2010-06-01 15:02:38 warning Management Agent received invalid schema response: com.redhat.matahari.nic Jun 1 15:09:09 ovirt qpidd[1595]: 2010-06-01 15:09:09 error Error reading socket: No route to host(113) And few minutes after my ovirt-server is unreachable. Rake seems to give a hard time to the cpu. Dmesg output in a picture, it's impossible to use ssh : http://i.imgur.com/JflIf.png Env : F13 64 bits, ovirt build yester from next. -- Arthur CLEMENT Linagora Paris From dpierce at redhat.com Tue Jun 1 18:12:33 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Tue, 1 Jun 2010 14:12:33 -0400 Subject: [Ovirt-devel] Replaced previous patch... Message-ID: <1275415954-11482-1-git-send-email-dpierce@redhat.com> The previous patch was rather mangled after merging with a current patch, so I refactored things. This patch replaces the previously submitted one. From dpierce at redhat.com Tue Jun 1 18:12:34 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Tue, 1 Jun 2010 14:12:34 -0400 Subject: [Ovirt-devel] [PATCH matahari] Moved all host-specific data gather to the Platform implementation. In-Reply-To: <1275415954-11482-1-git-send-email-dpierce@redhat.com> References: <1275415954-11482-1-git-send-email-dpierce@redhat.com> Message-ID: <1275415954-11482-2-git-send-email-dpierce@redhat.com> Since the previous code was very Linux-specific, it had to move out into the platform layer to keep the code OS-agnostic. Signed-off-by: Darryl L. Pierce --- src/host.cpp | 62 +++++----------------------------------------- src/host.h | 5 ---- src/linux_platform.cpp | 63 +++++++++++++++++++++++++++++++++++++++++++---- src/platform.h | 18 +++++++++++++ 4 files changed, 82 insertions(+), 66 deletions(-) diff --git a/src/host.cpp b/src/host.cpp index ecaf082..aa44d49 100644 --- a/src/host.cpp +++ b/src/host.cpp @@ -29,57 +29,9 @@ using namespace std; -const string UNKNOWN("Unknow"); - Host::Host() - :_uuid(UNKNOWN) - ,_hostname(UNKNOWN) - ,_hypervisor(UNKNOWN) - ,_architecture(UNKNOWN) - ,_memory(0) - ,_beeping(false) - ,_heartbeat_sequence(0) -{ - struct utsname details; - std::ifstream input("/var/lib/dbus/machine-id"); - - if(input.is_open()) - { - string uuid; - - getline(input, uuid); - input.close(); - this->_uuid = uuid; - } - - if(!uname(&details)) - { - this->_hostname = string(details.nodename); - this->_architecture = string(details.machine); - } - else - { - throw runtime_error("Unable to retrieve system details"); - } - - virConnectPtr lvconn = virConnectOpenReadOnly(NULL); - - if(lvconn) - { - this->_hypervisor = string(virConnectGetType(lvconn)); - virConnectClose(lvconn); - } - - struct sysinfo sysinf; - if(!sysinfo(&sysinf)) - { - this->_memory = sysinf.totalram / 1024L; - } - else - { - throw runtime_error("Unable to retrieve system memory details."); - } -} + :_heartbeat_sequence(0) +{ } void Host::update() @@ -120,31 +72,31 @@ Host::removeHostListener(HostListener* listener) string Host:: getUUID() const { - return _uuid; + return Platform::instance()->getUUID(); } string Host::getHostname() const { - return _hostname; + return Platform::instance()->getHostname(); } string Host::getHypervisor() const { - return _hypervisor; + return Platform::instance()->getHypervisor(); } string Host::getArchitecture() const { - return _architecture; + return Platform::instance()->getArchitecture(); } unsigned int Host::getMemory() const { - return _memory; + return Platform::instance()->getMemory(); } bool diff --git a/src/host.h b/src/host.h index ee70843..5a7eb2a 100644 --- a/src/host.h +++ b/src/host.h @@ -34,11 +34,6 @@ using namespace std; class Host { private: - string _uuid; - string _hostname; - string _hypervisor; - string _architecture; - unsigned int _memory; bool _beeping; unsigned int _heartbeat_sequence; diff --git a/src/linux_platform.cpp b/src/linux_platform.cpp index b05a327..0f71d23 100644 --- a/src/linux_platform.cpp +++ b/src/linux_platform.cpp @@ -21,11 +21,16 @@ #include #include #include +#include #include #include #include #include #include +#include +#include + +using namespace std; // TODO remove this wrapper once rhbz#583747 is fixed extern "C" { @@ -34,10 +39,54 @@ extern "C" { #include "linux_platform.h" +using namespace std; + LinuxPlatform::LinuxPlatform() { + struct utsname details; + ifstream *input; + + input = new ifstream("/var/lib/dbus/machine-id"); + + if(input->is_open()) + { + string uuid; + + getline(*input, uuid); + input->close(); + delete input; + this->setUUID(uuid); + } + + if(!uname(&details)) + { + this->setHostname(string(details.nodename)); + this->setArchitecture(string(details.machine)); + } + else + { + throw runtime_error("Unable to retrieve system details"); + } + + virConnectPtr lvconn = virConnectOpenReadOnly(NULL); + + if(lvconn) + { + this->setHypervisor(string(virConnectGetType(lvconn))); + virConnectClose(lvconn); + } + + struct sysinfo sysinf; + if(!sysinfo(&sysinf)) + { + this->setMemory(sysinf.totalram / 1024L); + } + else + { + throw runtime_error("Unable to retrieve system memory details."); + } + int cpu_count = 0; - string model = "unknown"; struct udev* udev = udev_new(); struct udev_enumerate* enumerator = udev_enumerate_new(udev); @@ -58,8 +107,9 @@ LinuxPlatform::LinuxPlatform() udev_enumerate_unref(enumerator); udev_unref(udev); - ifstream input("/proc/cpuinfo"); - if(input.is_open()) + input = new ifstream("/proc/cpuinfo"); + + if(input->is_open()) { string regexstr = "(.*\\S)\\s*:\\s*(\\S.*)"; int expected = 3; @@ -73,11 +123,11 @@ LinuxPlatform::LinuxPlatform() regex = pcre_compile(regexstr.c_str(), 0, &pcre_error, &pcre_error_offset, NULL); if(!regex) { throw runtime_error("Unable to compile regular expression."); } - while(!input.eof() && !done) + while(!input->eof() && !done) { string line; - getline(input, line); + getline(*input, line); int match = pcre_exec(regex, NULL, line.c_str(), line.length(), 0, PCRE_NOTEMPTY,found, expected * 3); @@ -104,7 +154,8 @@ LinuxPlatform::LinuxPlatform() } } } - input.close(); + input->close(); + delete input; } } diff --git a/src/platform.h b/src/platform.h index ba70378..7d6968f 100644 --- a/src/platform.h +++ b/src/platform.h @@ -37,6 +37,12 @@ class Platform private: static Platform* _instance; + string _uuid; + string _hostname; + string _hypervisor; + string _architecture; + unsigned int _memory; + string _cpu_model; unsigned int _cpu_cores; @@ -44,6 +50,12 @@ class Platform Platform() {} virtual~ Platform() {} + void setUUID(const string uuid) { _uuid = uuid; } + void setHostname(const string hostname) { _hostname = hostname; } + void setHypervisor(const string hypervisor) { _hypervisor = hypervisor; } + void setArchitecture(const string arch) { _architecture = arch; } + void setMemory(unsigned int memory) { _memory = memory; } + void setCPUModel(const string model) { _cpu_model = model; } void setNumberOfCPUCores(const int cores) { _cpu_cores = cores; } @@ -51,6 +63,12 @@ class Platform // the singleton instance static Platform* instance(); + string getUUID() const { return _uuid; } + string getHostname() const { return _hostname; } + string getHypervisor() const { return _hypervisor; } + string getArchitecture() const { return _architecture; } + unsigned int getMemory() const { return _memory; } + string getCPUModel() const { return _cpu_model; } unsigned int getNumberOfCPUCores() const { return _cpu_cores; } -- 1.7.0.1 From aclement at linagora.com Wed Jun 2 09:46:55 2010 From: aclement at linagora.com (Arthur =?iso-8859-15?q?Cl=E9ment?=) Date: Wed, 2 Jun 2010 11:46:55 +0200 Subject: [Ovirt-devel] [Matahari - Heartbeats] Feedback from last patches In-Reply-To: <20100528152752.GC24928@mcpierce-desktop.usersys.redhat.com> References: <1274984357-13415-1-git-send-email-dpierce@redhat.com> <20100528152752.GC24928@mcpierce-desktop.usersys.redhat.com> Message-ID: <201006021146.56105.aclement@linagora.com> Hi, I have problems with host-register and I noticed a bug which seems to be be linked to heartbeat : Here is an error log : INFO Wed Jun 02 09:48:33 +0200 2010 (6781) hostregister started. INFO Wed Jun 02 09:48:33 +0200 2010 (6781) Connecting to amqp://ovirt.admin.virt.par.lng:5672 ERROR Wed Jun 02 09:57:07 +0200 2010 (6781) Error in hostregister: SIGTERM ERROR Wed Jun 02 09:57:07 +0200 2010 (6781) /usr/share/ovirt-server/host-browser/host-register.rb:436:in `sleep'/usr/share/ovirt-server/host-browser/host -register.rb:436:in `check_heartbeats'/usr/share/ovirt-server/host-browser/host-register.rb:480:in `main'/usr/share/ovirt-server/host-browser/host-register.rb:483 All these lines refers to the check_heartbeats method 433 def check_heartbeats() 434 begin 435 while true 436 sleep(5) host-register service is very unstable and crash when I restart matahari on the node. On vendredi 28 mai 2010 17:27:53 Darryl L. Pierce wrote: > On Fri, May 28, 2010 at 11:31:19AM +0200, Andrew Beekhof wrote: > > ack > > I refactored the patch to include the heartbeat sequence, per your > feedback. This is now pushed upstream. Thank you. :) -- Arthur CLEMENT Linagora Paris From andrew at beekhof.net Wed Jun 2 11:00:33 2010 From: andrew at beekhof.net (Andrew Beekhof) Date: Wed, 2 Jun 2010 13:00:33 +0200 Subject: [Ovirt-devel] [Matahari] [PATCH matahari] Moved all host-specific data gather to the Platform implementation. In-Reply-To: <1275415954-11482-2-git-send-email-dpierce@redhat.com> References: <1275415954-11482-1-git-send-email-dpierce@redhat.com> <1275415954-11482-2-git-send-email-dpierce@redhat.com> Message-ID: As we talked about in the meeting, rather than being embedded in objects, the logic for things like parsing "/var/lib/dbus/machine-id" needs to be in a C function that the objects call out to. On Tue, Jun 1, 2010 at 8:12 PM, Darryl L. Pierce wrote: > Since the previous code was very Linux-specific, it had to move out into > the platform layer to keep the code OS-agnostic. > > Signed-off-by: Darryl L. Pierce > --- > ?src/host.cpp ? ? ? ? ? | ? 62 +++++----------------------------------------- > ?src/host.h ? ? ? ? ? ? | ? ?5 ---- > ?src/linux_platform.cpp | ? 63 +++++++++++++++++++++++++++++++++++++++++++---- > ?src/platform.h ? ? ? ? | ? 18 +++++++++++++ > ?4 files changed, 82 insertions(+), 66 deletions(-) > > diff --git a/src/host.cpp b/src/host.cpp > index ecaf082..aa44d49 100644 > --- a/src/host.cpp > +++ b/src/host.cpp > @@ -29,57 +29,9 @@ > > ?using namespace std; > > -const string UNKNOWN("Unknow"); > - > ?Host::Host() > - ?:_uuid(UNKNOWN) > - ?,_hostname(UNKNOWN) > - ?,_hypervisor(UNKNOWN) > - ?,_architecture(UNKNOWN) > - ?,_memory(0) > - ?,_beeping(false) > - ?,_heartbeat_sequence(0) > -{ > - ?struct utsname details; > - ?std::ifstream input("/var/lib/dbus/machine-id"); > - > - ?if(input.is_open()) > - ? ?{ > - ? ? ?string uuid; > - > - ? ? ?getline(input, uuid); > - ? ? ?input.close(); > - ? ? ?this->_uuid = uuid; > - ? ?} > - > - ?if(!uname(&details)) > - ? ?{ > - ? ? ?this->_hostname ? ? = string(details.nodename); > - ? ? ?this->_architecture = string(details.machine); > - ? ?} > - ?else > - ? ?{ > - ? ? ?throw runtime_error("Unable to retrieve system details"); > - ? ?} > - > - ?virConnectPtr lvconn = virConnectOpenReadOnly(NULL); > - > - ?if(lvconn) > - ? ?{ > - ? ? ?this->_hypervisor = string(virConnectGetType(lvconn)); > - ? ? ?virConnectClose(lvconn); > - ? ?} > - > - ?struct sysinfo sysinf; > - ?if(!sysinfo(&sysinf)) > - ? ?{ > - ? ? ?this->_memory = sysinf.totalram / 1024L; > - ? ?} > - ?else > - ? ?{ > - ? ? ?throw runtime_error("Unable to retrieve system memory details."); > - ? ?} > -} > + ?:_heartbeat_sequence(0) > +{ } > > ?void > ?Host::update() > @@ -120,31 +72,31 @@ Host::removeHostListener(HostListener* listener) > ?string > ?Host:: getUUID() const > ?{ > - ?return _uuid; > + ?return Platform::instance()->getUUID(); > ?} > > ?string > ?Host::getHostname() const > ?{ > - ?return _hostname; > + ?return Platform::instance()->getHostname(); > ?} > > ?string > ?Host::getHypervisor() const > ?{ > - ?return _hypervisor; > + ?return Platform::instance()->getHypervisor(); > ?} > > ?string > ?Host::getArchitecture() const > ?{ > - ?return _architecture; > + ?return Platform::instance()->getArchitecture(); > ?} > > ?unsigned int > ?Host::getMemory() const > ?{ > - ?return _memory; > + ?return Platform::instance()->getMemory(); > ?} > > ?bool > diff --git a/src/host.h b/src/host.h > index ee70843..5a7eb2a 100644 > --- a/src/host.h > +++ b/src/host.h > @@ -34,11 +34,6 @@ using namespace std; > ?class Host > ?{ > ?private: > - ?string ? ? ? ? ?_uuid; > - ?string ? ? ? ? ?_hostname; > - ?string ? ? ? ? ?_hypervisor; > - ?string ? ? ? ? ?_architecture; > - ?unsigned int ? ?_memory; > ? bool ? ? ? ? ? ?_beeping; > ? unsigned int ? ?_heartbeat_sequence; > > diff --git a/src/linux_platform.cpp b/src/linux_platform.cpp > index b05a327..0f71d23 100644 > --- a/src/linux_platform.cpp > +++ b/src/linux_platform.cpp > @@ -21,11 +21,16 @@ > ?#include > ?#include > ?#include > +#include > ?#include > ?#include > ?#include > ?#include > ?#include > +#include > +#include > + > +using namespace std; > > ?// TODO remove this wrapper once rhbz#583747 is fixed > ?extern "C" { > @@ -34,10 +39,54 @@ extern "C" { > > ?#include "linux_platform.h" > > +using namespace std; > + > ?LinuxPlatform::LinuxPlatform() > ?{ > + ?struct utsname details; > + ?ifstream *input; > + > + ?input = new ifstream("/var/lib/dbus/machine-id"); > + > + ?if(input->is_open()) > + ? ?{ > + ? ? ?string uuid; > + > + ? ? ?getline(*input, uuid); > + ? ? ?input->close(); > + ? ? ?delete input; > + ? ? ?this->setUUID(uuid); > + ? ?} > + > + ?if(!uname(&details)) > + ? ?{ > + ? ? ?this->setHostname(string(details.nodename)); > + ? ? ?this->setArchitecture(string(details.machine)); > + ? ?} > + ?else > + ? ?{ > + ? ? ?throw runtime_error("Unable to retrieve system details"); > + ? ?} > + > + ?virConnectPtr lvconn = virConnectOpenReadOnly(NULL); > + > + ?if(lvconn) > + ? ?{ > + ? ? ?this->setHypervisor(string(virConnectGetType(lvconn))); > + ? ? ?virConnectClose(lvconn); > + ? ?} > + > + ?struct sysinfo sysinf; > + ?if(!sysinfo(&sysinf)) > + ? ?{ > + ? ? ?this->setMemory(sysinf.totalram / 1024L); > + ? ?} > + ?else > + ? ?{ > + ? ? ?throw runtime_error("Unable to retrieve system memory details."); > + ? ?} > + > ? int cpu_count = 0; > - ?string model = "unknown"; > > ? struct udev* udev = udev_new(); > ? struct udev_enumerate* enumerator = udev_enumerate_new(udev); > @@ -58,8 +107,9 @@ LinuxPlatform::LinuxPlatform() > ? udev_enumerate_unref(enumerator); > ? udev_unref(udev); > > - ?ifstream input("/proc/cpuinfo"); > - ?if(input.is_open()) > + ?input = new ifstream("/proc/cpuinfo"); > + > + ?if(input->is_open()) > ? ? { > ? ? ? string regexstr = "(.*\\S)\\s*:\\s*(\\S.*)"; > ? ? ? int expected = 3; > @@ -73,11 +123,11 @@ LinuxPlatform::LinuxPlatform() > ? ? ? regex = pcre_compile(regexstr.c_str(), 0, &pcre_error, &pcre_error_offset, NULL); > ? ? ? if(!regex) { throw runtime_error("Unable to compile regular expression."); } > > - ? ? ?while(!input.eof() && !done) > + ? ? ?while(!input->eof() && !done) > ? ? ? ? { > ? ? ? ? ? string line; > > - ? ? ? ? ?getline(input, line); > + ? ? ? ? ?getline(*input, line); > ? ? ? ? ? int match = pcre_exec(regex, NULL, line.c_str(), line.length(), > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0, PCRE_NOTEMPTY,found, expected * 3); > > @@ -104,7 +154,8 @@ LinuxPlatform::LinuxPlatform() > ? ? ? ? ? ? ? ? } > ? ? ? ? ? ? } > ? ? ? ? } > - ? ? ?input.close(); > + ? ? ?input->close(); > + ? ? ?delete input; > ? ? } > ?} > > diff --git a/src/platform.h b/src/platform.h > index ba70378..7d6968f 100644 > --- a/src/platform.h > +++ b/src/platform.h > @@ -37,6 +37,12 @@ class Platform > ?private: > ? static Platform* _instance; > > + ?string ? ? ? ? ?_uuid; > + ?string ? ? ? ? ?_hostname; > + ?string ? ? ? ? ?_hypervisor; > + ?string ? ? ? ? ?_architecture; > + ?unsigned int ? ?_memory; > + > ? string ? ? ? _cpu_model; > ? unsigned int _cpu_cores; > > @@ -44,6 +50,12 @@ class Platform > ? Platform() {} > ? virtual~ Platform() {} > > + ?void setUUID(const string uuid) ? ? ? ? ? ? { _uuid = uuid; } > + ?void setHostname(const string hostname) ? ? { _hostname = hostname; } > + ?void setHypervisor(const string hypervisor) { _hypervisor = hypervisor; } > + ?void setArchitecture(const string arch) ? ? { _architecture = arch; } > + ?void setMemory(unsigned int memory) ? ? ? ? { _memory = memory; } > + > ? void setCPUModel(const string model) ? ? ?{ _cpu_model = model; } > ? void setNumberOfCPUCores(const int cores) { _cpu_cores = cores; } > > @@ -51,6 +63,12 @@ class Platform > ? // the singleton instance > ? static Platform* instance(); > > + ?string ? ? ? getUUID() const ? ? ? ? { return _uuid; } > + ?string ? ? ? getHostname() const ? ? { return _hostname; } > + ?string ? ? ? getHypervisor() const ? { return _hypervisor; } > + ?string ? ? ? getArchitecture() const { return _architecture; } > + ?unsigned int getMemory() const ? ? ? { return _memory; } > + > ? string ? ? ? getCPUModel() const ? ? ? ? { return _cpu_model; } > ? unsigned int getNumberOfCPUCores() const { return _cpu_cores; } > > -- > 1.7.0.1 > > _______________________________________________ > Matahari mailing list > Matahari at lists.fedorahosted.org > https://fedorahosted.org/mailman/listinfo/matahari > From mloiseleur at linagora.com Tue Jun 8 09:31:25 2010 From: mloiseleur at linagora.com (Loiseleur Michel) Date: Tue, 8 Jun 2010 11:31:25 +0200 Subject: [Ovirt-devel] [PATCH] Fix optimistic locking during vm migration Message-ID: <1275989485-5425-1-git-send-email-mloiseleur@linagora.com> Signed-off-by: Loiseleur Michel --- src/db-omatic/db_omatic.rb | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/db-omatic/db_omatic.rb b/src/db-omatic/db_omatic.rb index da11bfa..79f29d2 100755 --- a/src/db-omatic/db_omatic.rb +++ b/src/db-omatic/db_omatic.rb @@ -195,6 +195,9 @@ class DbOmatic < Qmf::ConsoleHandler end @logger.info "Updating VM #{domain['name']} to state #{state}" + # Optimistic locking often fails for this operation + # See http://api.rubyonrails.org/classes/ActiveRecord/Locking/Pessimistic.html#M001320 + vm.lock! if state == Vm::STATE_STOPPED @logger.info "VM has moved to stopped, clearing VM attributes." -- 1.7.0.4 From aclement at linagora.com Tue Jun 8 13:59:48 2010 From: aclement at linagora.com (Arthur =?iso-8859-1?q?Cl=E9ment?=) Date: Tue, 8 Jun 2010 15:59:48 +0200 Subject: [Ovirt-devel] ovirt-config-iscsi : semi-random initiator file Message-ID: <201006081559.48908.aclement@linagora.com> Hi, We are experiencing problems with the iscsi configuration. The /etc/iscsi/initiatorname.iscsi is randomly generated during the node build (%{_libexecdir}/ovirt-config-iscsi in ovirt-node.spec), that makes all nodes have the same "random" initiator file. The iscsi server doesn't like that very much, it believes that come from the same node (-> sessions killed, multipathing...) I'm looking for a good way to launch this script during the boot to generate real random initiators. -- Arthur CLEMENT Linagora Paris From imain at redhat.com Tue Jun 8 23:16:08 2010 From: imain at redhat.com (Ian Main) Date: Tue, 08 Jun 2010 16:16:08 -0700 Subject: [Ovirt-devel] [PATCH] Fix optimistic locking during vm migration In-Reply-To: <1275989485-5425-1-git-send-email-mloiseleur@linagora.com> References: <1275989485-5425-1-git-send-email-mloiseleur@linagora.com> Message-ID: <1276038968.3007.8.camel@localhost.localdomain> On Tue, 2010-06-08 at 11:31 +0200, Loiseleur Michel wrote: > Signed-off-by: Loiseleur Michel > --- > src/db-omatic/db_omatic.rb | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/src/db-omatic/db_omatic.rb b/src/db-omatic/db_omatic.rb > index da11bfa..79f29d2 100755 > --- a/src/db-omatic/db_omatic.rb > +++ b/src/db-omatic/db_omatic.rb > @@ -195,6 +195,9 @@ class DbOmatic < Qmf::ConsoleHandler > end > > @logger.info "Updating VM #{domain['name']} to state #{state}" > + # Optimistic locking often fails for this operation > + # See http://api.rubyonrails.org/classes/ActiveRecord/Locking/Pessimistic.html#M001320 > + vm.lock! I haven't looked at the code this is going into yet, but don't you need a way to retry on failure? Ian From mloiseleur at linagora.com Wed Jun 9 11:37:27 2010 From: mloiseleur at linagora.com (Michel Loiseleur) Date: Wed, 09 Jun 2010 13:37:27 +0200 Subject: [Ovirt-devel] [PATCH] Fix optimistic locking during vm migration In-Reply-To: <1276038968.3007.8.camel@localhost.localdomain> References: <1275989485-5425-1-git-send-email-mloiseleur@linagora.com> <1276038968.3007.8.camel@localhost.localdomain> Message-ID: <4C0F7CF7.3020700@linagora.com> Le 09/06/2010 01:16, Ian Main a ?crit : > On Tue, 2010-06-08 at 11:31 +0200, Loiseleur Michel wrote: > >> Signed-off-by: Loiseleur Michel >> --- >> src/db-omatic/db_omatic.rb | 3 +++ >> 1 files changed, 3 insertions(+), 0 deletions(-) >> >> diff --git a/src/db-omatic/db_omatic.rb b/src/db-omatic/db_omatic.rb >> index da11bfa..79f29d2 100755 >> --- a/src/db-omatic/db_omatic.rb >> +++ b/src/db-omatic/db_omatic.rb >> @@ -195,6 +195,9 @@ class DbOmatic < Qmf::ConsoleHandler >> end >> >> @logger.info "Updating VM #{domain['name']} to state #{state}" >> + # Optimistic locking often fails for this operation >> + # See http://api.rubyonrails.org/classes/ActiveRecord/Locking/Pessimistic.html#M001320 >> + vm.lock! >> > I haven't looked at the code this is going into yet, but don't you need > a way to retry on failure? > Db-o-matic is already re-trying to update status of a vm if it was not done before. IMHO, there's no need to re-implement it at this level. Regards, -- Loiseleur Michel Directeur de l'OSSA Linagora / 80, rue Roque de Fillol / 92800 PUTEAUX Tel/Fax : +33 1 46 96 63 63 / +33 1 46 96 63 64 http://www.08000linux.com/ | http://www.tosca-project.net "Ce n'est pas le logiciel qui est libre, c'est vous" -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: From mloiseleur at linagora.com Mon Jun 14 08:46:34 2010 From: mloiseleur at linagora.com (Loiseleur Michel) Date: Mon, 14 Jun 2010 10:46:34 +0200 Subject: [Ovirt-devel] [PATCH] Display available space in lvm pool Message-ID: <1276505194-7617-1-git-send-email-mloiseleur@linagora.com> --- src/app/models/iscsi_storage_volume.rb | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/app/models/iscsi_storage_volume.rb b/src/app/models/iscsi_storage_volume.rb index fe2cbf5..0a0797d 100644 --- a/src/app/models/iscsi_storage_volume.rb +++ b/src/app/models/iscsi_storage_volume.rb @@ -19,7 +19,12 @@ class IscsiStorageVolume < StorageVolume def label_components - "#{storage_pool[:target]}:#{lun}" + available = self.size_in_gb - self.lvm_storage_pool.storage_volumes.total_size_in_gb if self.lvm_storage_pool + if self.lvm_storage_pool + "#{storage_pool[:target]}:#{lun} #{available}GB available" + else + "#{storage_pool[:target]}:#{lun}" + end end def volume_name -- 1.7.0.4