You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by bhaisaab <gi...@git.apache.org> on 2015/06/01 14:59:26 UTC

[GitHub] cloudstack pull request: CLOUDSTACK-8530: KVM hosts without active...

GitHub user bhaisaab opened a pull request:

    https://github.com/apache/cloudstack/pull/340

    CLOUDSTACK-8530: KVM hosts without active agents should be in Disconnected state

    KVM hosts which are up but their agents are shutdown should be put
    in disconnected state. This would avoid getting the VMs HA'd and other commands
    such as deploying a VM will exclude that host and save us from errors.
    
    The improvement is that, we first try to contact the KVM host itself. If it fails
    we assume that it's disconnected, and then ask its KVM neighbours if they can
    check its status. If all of the KVM neighbours tell us that it's Down and we're
    unable to reach the KVM host, then the host is possibly down. In case any of the
    KVM neighbours tell us that it's Up but we're unable to reach the KVM host then
    we can be sure that the agent is offline but the host is running.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/cloudstack CLOUDSTACK-8530

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/340.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #340
    
----
commit 43a0b6bb064f607196bdf84819e1b472e4a705fb
Author: Rohit Yadav <ro...@shapeblue.com>
Date:   2015-06-01T12:53:58Z

    CLOUDSTACK-8530: KVM hosts without active agents should be in Disconnected state
    
    KVM hosts which are actuall up, but if their agents are shutdown should be put
    in disconnected state. This would avoid getting the VMs HA'd and other commands
    such as deploying a VM will exclude that host and save us from errors.
    
    The improvement is that, we first try to contact the KVM host itself. If it fails
    we assume that it's disconnected, and then ask its KVM neighbours if they can
    check its status. If all of the KVM neighbours tell us that it's Down and we're
    unable to reach the KVM host, then the host is possibly down. In case any of the
    KVM neighbours tell us that it's Up but we're unable to reach the KVM host then
    we can be sure that the agent is offline but the host is running.
    
    Signed-off-by: Rohit Yadav <ro...@shapeblue.com>

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8530: KVM hosts without active...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on the pull request:

    https://github.com/apache/cloudstack/pull/340#issuecomment-107674771
  
    pinging KVM and HA gurus to help review this @kishankavala @wilderrodrigues @remibergsma @mlsorensen @abhinandanprateek @devdeep and others
    thanks :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8530: KVM hosts without active...

Posted by wilderrodrigues <gi...@git.apache.org>.
Github user wilderrodrigues commented on the pull request:

    https://github.com/apache/cloudstack/pull/340#issuecomment-107918808
  
    After running this on my KVM host:
    
    [root@kvm1 ~]# systemctl stop cloudstack-agent
    [root@kvm1 ~]# 
    
    The management server said:
    
    ![image](https://cloud.githubusercontent.com/assets/5129209/7934678/144fde12-092a-11e5-9470-0cdcff2779c7.png)
    
    Then I started it agains:
    
    [root@kvm1 ~]# systemctl start cloudstack-agent
    [root@kvm1 ~]# systemctl status cloudstack-agent
    cloudstack-agent.service - SYSV: Cloud Agent
       Loaded: loaded (/etc/rc.d/init.d/cloudstack-agent)
       Active: active (running) since Tue 2015-06-02 07:20:10 EDT; 3s ago
      Process: 20054 ExecStop=/etc/rc.d/init.d/cloudstack-agent stop (code=exited, status=0/SUCCESS)
      Process: 20090 ExecStart=/etc/rc.d/init.d/cloudstack-agent start (code=exited, status=0/SUCCESS)
       CGroup: /system.slice/cloudstack-agent.service
               ├─20106 jsvc.exec -Xms256m -Xmx2048m -cp /usr/share/java/commons-daemon.jar:/usr/share/cloudstack-agent/lib/activation-1.1.jar:/usr/share/cloudstack-agent/lib/antisamy-1.4.3.jar:/usr/share/cloudstack-agent/lib/aopalliance-1.0.jar:/usr/share/cloudstack-agent/...
               └─20107 jsvc.exec -Xms256m -Xmx2048m -cp /usr/share/java/commons-daemon.jar:/usr/share/cloudstack-agent/lib/activation-1.1.jar:/usr/share/cloudstack-agent/lib/antisamy-1.4.3.jar:/usr/share/cloudstack-agent/lib/aopalliance-1.0.jar:/usr/share/cloudstack-agent/...
    
    Jun 02 07:20:10 kvm1 systemd[1]: Starting SYSV: Cloud Agent...
    Jun 02 07:20:10 kvm1 cloudstack-agent[20090]: Starting Cloud Agent:
    Jun 02 07:20:10 kvm1 systemd[1]: Started SYSV: Cloud Agent.
    [root@kvm1 ~]# 
    
    And on the UI:
    
    ![image](https://cloud.githubusercontent.com/assets/5129209/7934689/315da494-092a-11e5-8401-619c34b20854.png)
    
    Thanks, Rohit!
    
    I will merge.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8530: KVM hosts without active...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on the pull request:

    https://github.com/apache/cloudstack/pull/340#issuecomment-107943645
  
    @wilderrodrigues thanks, but the test you did is perhaps not enough as it cleanly shutsdown the agent. In my test, I did these things:
    - kill -9 the agent to see what happens
    - add firewall rule to block mgmt server traffic to the kvm host, using something like: iptables -A INPUT -s 192.168.1.12 -j DROP
    - using a cluster of three nodes, add the firewall rules to see how it behaves when neighbours report it is Up/Down and host is not reachable


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8530: KVM hosts without active...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cloudstack/pull/340


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8530: KVM hosts without active...

Posted by wilderrodrigues <gi...@git.apache.org>.
Github user wilderrodrigues commented on the pull request:

    https://github.com/apache/cloudstack/pull/340#issuecomment-108220808
  
    Nice write up, @bhaisaab 
    
    I can still take some time, later this week, and go through the steps you have tested. Just quite busy right now.
    
     Let's try to have template for PRs, so the "test steps" are also added.
    
    Cheers,
    Wilder 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8530: KVM hosts without active...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on the pull request:

    https://github.com/apache/cloudstack/pull/340#issuecomment-107434772
  
    Issue: https://issues.apache.org/jira/browse/CLOUDSTACK-8530


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8530: KVM hosts without active...

Posted by mlsorensen <gi...@git.apache.org>.
Github user mlsorensen commented on the pull request:

    https://github.com/apache/cloudstack/pull/340#issuecomment-107684409
  
    Looks fine to me.
    
    On Mon, Jun 1, 2015 at 12:13 PM, Rohit Yadav <no...@github.com>
    wrote:
    
    > pinging KVM and HA gurus to help review this @kishankavala
    > <https://github.com/kishankavala> @wilderrodrigues
    > <https://github.com/wilderrodrigues> @remibergsma
    > <https://github.com/remibergsma> @mlsorensen
    > <https://github.com/mlsorensen> @abhinandanprateek
    > <https://github.com/abhinandanprateek> @devdeep
    > <https://github.com/devdeep> and others
    > thanks :)
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/cloudstack/pull/340#issuecomment-107674771>.
    >



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---