Skip to content

Host KVM Installation, Who is responsible for configuration files? #4393

Description

@rvalle
ISSUE TYPE
  • Documentation Report
COMPONENT NAME
KVM Node / Agent
CLOUDSTACK VERSION
4.14
CONFIGURATION
OS / ENVIRONMENT

Ubuntu 18.04

SUMMARY

According to the documentation it is admins responsibility to configure libvirt and qemu, I have written Ansible playbooks to do so. However, I believe the agent is also configuring them, now ansible and cloudstack agent compete for changing those files.

STEPS TO REPRODUCE
- Read ACS Manual: Quickstart/Installation of KVM
- Write playbooks to automate configuration of KVM (libvirt, qemu, etc).
- Configure your cluster
- ACS Agent will alter the configuration
- Following Playbook runs will break the configured system (i.e. when adding a new host to the cluster).
EXPECTED RESULTS
The responsibility over configuration files should be clear, either the Administrator or ACS.
When responsibility is shared a conf.d directory pattern should be used.
So I expect that either my configuration is not overridden or that ACS will deal with the configuration.

ACTUAL RESULTS
Both my playbooks and ACS Agent keep fighting for control of KVM/Libvirt configuration files.

Activity

  1. changed the title [-]Host KVM Installation, Who is responsible?[/-] [+]Host KVM Installation, Who is responsible for configuration files?[/+] on Oct 9, 2020
  2. rvalle commented on Oct 11, 2020

    @rvalle
    ContributorAuthor

    ... it looks like ACS is automatically doing the changes requests in the documentation by itself.
    at least that is how it looks on Ubuntu 18.04...

    running some tests of my deployment playbooks wihtout configuring libvirt/qemu at all.

  3. weizhouapache commented on Oct 11, 2020

    @weizhouapache
    Member
  4. rvalle commented on Oct 11, 2020

    @rvalle
    ContributorAuthor

    @weizhouapache thanks for pointing out.

    I tried to deploy an ACS test cluster from scratch without touching these files:

    TASK [privazio.vdc.cloudstack-node : Install Cloudstack agent packages in Debian derivatives] ***
    changed: [compute2]
    changed: [compute1]
    TASK [privazio.vdc.cloudstack-node : Configure Cloudstack node firewall rules] ***
    changed: [compute1]
    changed: [compute2]
    TASK [privazio.vdc.cloudstack-node : Configure qemu] ***************************
    skipping: [compute1]
    skipping: [compute2]
    TASK [privazio.vdc.cloudstack-node : Configure libvirtd] ***********************
    skipping: [compute1]
    skipping: [compute2]
    TASK [privazio.vdc.cloudstack-node : Configure libvirtd defaults] **************
    skipping: [compute1]
    skipping: [compute2]
    TASK [privazio.vdc.cloudstack-node : Start Cloudstack node services] ***********
    ok: [compute1] => (item=libvirtd)
    ok: [compute2] => (item=libvirtd)
    

    And it turns out the cluster is fully functional.

    Screenshot_2020-10-11 CloudStack

    I guess the installation documentation is out of date, at least for Ubuntu, with initial libvirt configuration fully performed by ACS.

    @andrijapanicsb helped me before with another similar issue related to Firewall rules, where the documentation lists all the required rules but some rules for the link-local came from somewhere else... when placing the firewall under configuration management a similar problem came up.

  5. rvalle commented on Jan 19, 2021

    @rvalle
    ContributorAuthor

    @DaanHoogland I am following up with this issue.

    @weizhouapache the changes that you mention are they triggered when the host is added?

    I think we should include a mention on the documentation that the installation, but I am not sure what to, perhaps:

    Please note that Cloudstack will automatically perform basic configuration of the agent and libvirt when the host is added. This is relevant if you are planning to automate the deployment of your KVM hosts.

  6. weizhouapache commented on Jan 19, 2021

    @weizhouapache
    Member

    @DaanHoogland I am following up with this issue.

    @weizhouapache the changes that you mention are they triggered when the host is added?

    @rvalle yes. it is part of cloudstack-setup-agent. more details at
    https://github.com/apache/cloudstack/blob/master/python/lib/cloudutils/syscfg.py
    https://github.com/apache/cloudstack/blob/master/python/lib/cloudutils/serviceConfig.py

    If there are two physical networks, you have to configure cloudbr0 and cloudbr1 manually, as it only configures the cloudbr0.
    It does not work for ubuntu 20.04

    I think we should include a mention on the documentation that the installation, but I am not sure what to, perhaps:

    Please note that Cloudstack will automatically perform basic configuration of the agent and libvirt when the host is added. This is relevant if you are planning to automate the deployment of your KVM hosts.

  7. DaanHoogland commented on Feb 1, 2021

    @DaanHoogland
    Contributor

    @rvalle wil you send a PR to the docs repo?

  8. rvalle commented on Feb 2, 2021

    @rvalle
    ContributorAuthor

    @DaanHoogland yes, I will do.

  9. DaanHoogland commented on Feb 5, 2021

    @DaanHoogland
    Contributor

    closing this @rvalle

  10. rvalle commented on Feb 10, 2021

    @rvalle
    ContributorAuthor

    @DaanHoogland sorry for the delay, I was implementing the new inventory plugin for ansible modules.

    Can you point me where the documentation source is?

  11. rvalle commented on Feb 10, 2021

    @rvalle
    ContributorAuthor

    OK I see is a different project...

  12. rvalle commented on Feb 10, 2021

    @rvalle
    ContributorAuthor

    better late than never... it surprises me to be the #1 pull request,
    @DaanHoogland is this supposed to be how you address doc changes?

  13. DaanHoogland commented on Feb 10, 2021

    @DaanHoogland
    Contributor

    @rvalle you created a pull request to your own fork of the repo.

  14. rvalle commented on Feb 10, 2021

    @rvalle
    ContributorAuthor

    thanks! no idea how it happened. first time I edit a file inside github.

  15. added this to the unplanned milestone on Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions