You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Soheil Eizadi <se...@infoblox.com> on 2013/07/06 03:55:58 UTC

Plugin/ Agent/ Host States

I am trying to understand how the Host object state transitions to Up state? I see it starts in Alert state.
There is not a setter for status and the comment for it in HostVO.java said:

   /**

     * Note: There is no setter for status because it has to be set in the dao code.

     */

    @Column(name="status", nullable=false)

    private Status status = null;


Thanks,
-Soheil

RE: Plugin/ Agent/ Host States

Posted by Soheil Eizadi <se...@infoblox.com>.
Here is the answer to this question, the Host State has the following states, most likely in this order:
Alert >> Connecting >> Up >> Disconnected

After the Plugin Resource gets called with Configure() and Start(), the Plugin Agent Manager creates the Host resource associated with the Plugin. The Agent Manger calls the Plugin Resource with a couple of commands to ensure it is proper state:  ReadyCommand() and MaintainCommand() a response to these commands brings up and keeps the Plugin in the Up state.

There is an additional Command GetHostStatsCommand() that is sent by Agent Manager, I don't see any of the Network Plugins respond to this command. I assume since it Hypervisor focused. If you don't respond to it properly you get following warnings. It is good practice to fill in the parts of the message that applies to a generic plugin to get rid of the warnings from log files:

WARN  [agent.manager.AgentManagerImpl] (StatsCollector-2:) Unsupported Command: Unsupported command issued:com.cloud.agent.api.GetHostStatsCommand.  Are you sure you got the right type of server?
WARN  [cloud.server.StatsCollector] (StatsCollector-2:) Received invalid host stats for host: 2

The Agent Manager log error messages don't have the Host name, just the Host id, so you need to look them up in the database. Probably good practice for the logs to also print the name, so in the warning above host Id=2 is Infoblox Controller.

id               name                                                        uuid                                          status	
1      xenserver1-cloudstack                      59f27a99-8133-4890-a845-d45668068742       Up
2      Infoblox Controller - 172.16.197.135   c430126c-97b8-434e-bd8d-db1d96832921       Up

The GetHostStatsCommand() might be a good placeholder to get Network Plugin stats.
-Soheil

________________________________________
From: Soheil Eizadi [seizadi@infoblox.com]
Sent: Friday, July 05, 2013 6:55 PM
To: dev@cloudstack.apache.org
Subject: Plugin/ Agent/ Host States

I am trying to understand how the Host object state transitions to Up state? I see it starts in Alert state.
There is not a setter for status and the comment for it in HostVO.java said:

   /**

     * Note: There is no setter for status because it has to be set in the dao code.

     */

    @Column(name="status", nullable=false)

    private Status status = null;


Thanks,
-Soheil