Ticket #51 (closed bug: fixed)

Opened 2 years ago

Last modified 1 year ago

StartManager.pl fails if an old clone is still registered in the console

Reported by: xkovah Assigned to: kindlund
Priority: high Milestone: 0.9
Component: HoneyClient::Manager Version: 0.94
Severity: major Keywords: isRegisteredVM, Manager
Cc:

Description

OK, and this is the bug which I was previously experiencing sometimes and only now have nailed down. StartManager.pl can fail prematurely even though the master vm's config file is set right and the permissions are all 777. This is basically the same as one I mentioned over aim to Darien which looks like it might be specific to something in my setup. What I had mentioned was that if my master vm is registered in the console inventory then it crashes, so I was just removing the master before I started. But now I see that also it seems to crash early if a hash-named-clone is still registered from a previous run. Also, I will clarify that while the script seemingly crashes (that is, it drops me to a shell prompt after outputting the error), the script still appears to be running in the background as shown in the ps output below, and as seen by the fact that the clone that it was making when it crashed still seems to get all the way to booting up, it just never receives anything from the manager.

new-ghibli:~/HoneyClient-Manager-0.92 # perl bin/StartManager.pl www.cnn.com
Useless use of a variable in void context at /usr/lib/perl5/site_perl/5.8.8/i586-linux-thread-multi/IPTables/IPv4.pm line 5.
Starting new session...
VM Daemon Listening On: http://localhost:8089/HoneyClient/Manager/VM
Calling setMasterVM()...
Result: 1
Calling quickCloneVM()...
Result: /vm/edc639ee60d6255aa738d5ed2e/newwin.vmx
Calling isRegisteredVM()...
Calling isRegisteredVM()...
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager.pm line 478.
new-ghibli:~/HoneyClient-Manager-0.92 # ps aux | grep perl
root     12767  0.5  1.8  51520 38464 pts/2    S    21:20   0:01 perl bin/StartManager.pl www.cnn.com
new-ghibli:~/HoneyClient-Manager-0.92 # kill -9 12767
new-ghibli:~/HoneyClient-Manager-0.92 # kill -9 12767
bash: kill: (12767) - No such process

verbose output to follow

Attachments

Change History

02/14/07 21:32:34 changed by xkovah

As you can see in the debug output, information was printed out after it dropped to a command prompt and I typed "ps aux | grep perl"+enter and then typed "ps aux | grep StartManager" but hadn't pressed return yet (so there was a bit of a delay).

new-ghibli:~/HoneyClient-Manager-0.92 # perl bin/StartManager.pl www.cnn.com
2007-02-14 21:31:03 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'datastore_path'}
2007-02-14 21:31:03 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'snapshot_path'}
2007-02-14 21:31:04 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'vmware_port'}
2007-02-14 21:31:04 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'vm_id_length'}
2007-02-14 21:31:04 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'dhcp_log'}
Useless use of a variable in void context at /usr/lib/perl5/site_perl/5.8.8/i586-linux-thread-multi/IPTables/IPv4.pm line 5.
2007-02-14 21:31:04 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::FW','name' => 'config_file'}
Starting new session...
2007-02-14 21:31:04 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::FW','name' => 'address'}
2007-02-14 21:31:04 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::FW','name' => 'port'}
2007-02-14 21:31:04 DEBUG [HoneyClient::Util::SOAP::getClientHandle] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/SOAP.pm:457) - {'fault_handler' => sub { "DUMMY" },'namespace' => 'HoneyClient::Manager::FW','address' => '192.168.0.128','port' => '8083'}
2007-02-14 21:31:04 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::FW','name' => 'timeout'}
2007-02-14 21:31:05 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'address'}
2007-02-14 21:31:05 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'port'}
2007-02-14 21:31:05 DEBUG [HoneyClient::Util::SOAP::getServerHandle] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/SOAP.pm:359) - {'namespace' => 'HoneyClient::Manager::VM','address' => 'localhost','port' => '8089'}
VM Daemon Listening On: http://localhost:8089/HoneyClient/Manager/VM
2007-02-14 21:31:06 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'address'}
2007-02-14 21:31:06 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'port'}
2007-02-14 21:31:06 DEBUG [HoneyClient::Util::SOAP::getClientHandle] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/SOAP.pm:457) - {'fault_handler' => sub { "DUMMY" },'namespace' => 'HoneyClient::Manager::VM','address' => 'localhost','port' => '8089'}
2007-02-14 21:31:06 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'timeout'}
Calling setMasterVM()...
2007-02-14 21:31:06 DEBUG [HoneyClient::Manager::VM::setMasterVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:3626) - {'config' => '/vm/newwin/newwin.vmx'}
2007-02-14 21:31:06 DEBUG [HoneyClient::Manager::VM::isRegisteredVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1211) - {'config' => '/vm/newwin/newwin.vmx'}
2007-02-14 21:31:06 DEBUG [HoneyClient::Manager::VM::enumerate] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1295) - {}2007-02-14 21:31:06 DEBUG [HoneyClient::Manager::VM::registerVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:2953) - {'config' => '/vm/newwin/newwin.vmx'}
2007-02-14 21:31:13 DEBUG [HoneyClient::Manager::VM::getStateVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1396) - {'config' => '/vm/newwin/newwin.vmx'}
2007-02-14 21:31:13 DEBUG [HoneyClient::Manager::VM::unregisterVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:3078) - {'config' => '/vm/newwin/newwin.vmx'}
Result: 1
Calling quickCloneVM()...
2007-02-14 21:31:18 DEBUG [HoneyClient::Manager::VM::quickCloneVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:3915) - {}
2007-02-14 21:31:18 DEBUG [HoneyClient::Manager::VM::isRegisteredVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1211) - {'config' => '/vm/newwin/newwin.vmx'}
2007-02-14 21:31:18 DEBUG [HoneyClient::Manager::VM::enumerate] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1295) - {}2007-02-14 21:31:18 DEBUG [HoneyClient::Manager::VM::registerVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:2953) - {'config' => '/vm/newwin/newwin.vmx'}
2007-02-14 21:31:26 DEBUG [HoneyClient::Manager::VM::getStateVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1396) - {'config' => '/vm/newwin/newwin.vmx'}
2007-02-14 21:31:26 DEBUG [HoneyClient::Manager::VM::unregisterVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:3078) - {'config' => '/vm/newwin/newwin.vmx'}
Result: /vm/82d3ffe5ae6c68eb36495b8979/newwin.vmx
Calling isRegisteredVM()...
2007-02-14 21:31:31 DEBUG [HoneyClient::Manager::VM::isRegisteredVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1211) - {'config' => '/vm/82d3ffe5ae6c68eb36495b8979/newwin.vmx'}
2007-02-14 21:31:31 DEBUG [HoneyClient::Manager::VM::enumerate] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1295) - {}Calling isRegisteredVM()...
2007-02-14 21:31:34 DEBUG [HoneyClient::Manager::VM::isRegisteredVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1211) - {'config' => '/vm/82d3ffe5ae6c68eb36495b8979/newwin.vmx'}
2007-02-14 21:31:34 DEBUG [HoneyClient::Manager::VM::enumerate] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1295) - {}Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager.pm line 478.
new-ghibli:~/HoneyClient-Manager-0.92 # ps aux | grep perl
root     12863  1.8  1.8  51508 38316 pts/2    Sl   21:31   0:00 perl bin/StartManager.pl www.cnn.com
root     12888  0.0  0.0   1860   632 pts/2    R+   21:31   0:00 grep perl
new-ghibli:~/HoneyClient-Manager-0.92 # ps aux | grep StartManager2007-02-14 21:32:02 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'address'}
2007-02-14 21:32:02 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'port'}
2007-02-14 21:32:02 DEBUG [HoneyClient::Util::SOAP::getClientHandle] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/SOAP.pm:457) - {'fault_handler' => sub { "DUMMY" },'namespace' => 'HoneyClient::Manager::VM','address' => 'localhost','port' => '8089'}
2007-02-14 21:32:02 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'timeout'}
2007-02-14 21:32:02 DEBUG [HoneyClient::Manager::VM::registerVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:2953) - {'config' => '/vm/82d3ffe5ae6c68eb36495b8979/newwin.vmx'}
2007-02-14 21:32:07 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'address'}
2007-02-14 21:32:07 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'port'}
2007-02-14 21:32:07 DEBUG [HoneyClient::Util::SOAP::getClientHandle] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/SOAP.pm:457) - {'fault_handler' => sub { "DUMMY" },'namespace' => 'HoneyClient::Manager::VM','address' => 'localhost','port' => '8089'}
2007-02-14 21:32:07 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'timeout'}
2007-02-14 21:32:07 DEBUG [HoneyClient::Manager::VM::setNameVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:2500) - {'name' => '82d3ffe5ae6c68eb36495b8979','config' => '/vm/82d3ffe5ae6c68eb36495b8979/newwin.vmx'}
2007-02-14 21:32:07 DEBUG [HoneyClient::Manager::VM::isRegisteredVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1211) - {'config' => '/vm/82d3ffe5ae6c68eb36495b8979/newwin.vmx'}
2007-02-14 21:32:07 DEBUG [HoneyClient::Manager::VM::enumerate] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1295) - {}2007-02-14 21:32:09 DEBUG [HoneyClient::Manager::VM::getStateVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1396) - {'name' => '82d3ffe5ae6c68eb36495b8979','config' => '/vm/82d3ffe5ae6c68eb36495b8979/newwin.vmx'}
2007-02-14 21:32:09 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'address'}
2007-02-14 21:32:09 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'port'}
2007-02-14 21:32:09 DEBUG [HoneyClient::Util::SOAP::getClientHandle] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/SOAP.pm:457) - {'fault_handler' => sub { "DUMMY" },'namespace' => 'HoneyClient::Manager::VM','address' => 'localhost','port' => '8089'}
2007-02-14 21:32:09 DEBUG [HoneyClient::Util::Config::getVar] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Util/Config.pm:405) - {'namespace' => 'HoneyClient::Manager::VM','name' => 'timeout'}
2007-02-14 21:32:09 DEBUG [HoneyClient::Manager::VM::startVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1524) - {'config' => '/vm/82d3ffe5ae6c68eb36495b8979/newwin.vmx'}
2007-02-14 21:32:09 DEBUG [HoneyClient::Manager::VM::isRegisteredVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1211) - {'config' => '/vm/82d3ffe5ae6c68eb36495b8979/newwin.vmx'}
2007-02-14 21:32:09 DEBUG [HoneyClient::Manager::VM::enumerate] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1295) - {}2007-02-14 21:32:11 DEBUG [HoneyClient::Manager::VM::getStateVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1396) - {'config' => '/vm/82d3ffe5ae6c68eb36495b8979/newwin.vmx'}
2007-02-14 21:32:12 DEBUG [HoneyClient::Manager::VM::getStateVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1396) - {'config' => '/vm/82d3ffe5ae6c68eb36495b8979/newwin.vmx'}
2007-02-14 21:32:12 DEBUG [HoneyClient::Manager::VM::answerVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:3237) - {'config' => '/vm/82d3ffe5ae6c68eb36495b8979/newwin.vmx'}
2007-02-14 21:32:12 DEBUG [HoneyClient::Manager::VM::getStateVM] (/usr/lib/perl5/site_perl/5.8.8/HoneyClient/Manager/VM.pm:1396) - {'config' => '/vm/82d3ffe5ae6c68eb36495b8979/newwin.vmx'}

02/16/07 18:35:16 changed by kindlund

  • status changed from new to assigned.
  • severity changed from none to major.
  • component changed from Unknown to HoneyClient::Manager.
  • priority changed from normal to high.
  • owner changed from knwang to kindlund.
  • milestone set to 1.0.
  • keywords set to isRegisteredVM, Manager.

Opened bug branch 51; verifying fix.

02/26/07 09:50:02 changed by kindlund

  • status changed from assigned to closed.
  • resolution set to fixed.

Tested and fixed in r196.

08/29/07 14:07:19 changed by kindlund

  • version changed from none to 0.94.
  • milestone changed from 1.0 to 0.9.

Add/Change #51 (StartManager.pl fails if an old clone is still registered in the console)




Change Properties
Action