You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Felipe Polanco <fe...@gmail.com> on 2022/04/27 22:28:03 UTC

libvirt.vif.driver ignored in ACS 4.16

Hi,

We are trying to setup Open Vswitch in ACS 4.16 and we have added the
following lines to the agent config file and manually created the bridges
in OVS:

network.bridge.type=openvswitch
libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.OvsVifDriver

# ovs-vsctl show
a6558802-d843-4285-90bc-c884ee9df0d2
    Bridge cloudbr0
        Port bond0
            Interface eth2
            Interface eth3
        Port cloudbr0
            Interface cloudbr0
                type: internal
        Port vlan110
            tag: 110
            Interface vlan110
                type: internal
        Port vlan100
            tag: 100
            Interface vlan100
                type: internal
    ovs_version: "2.13.5"



However, cloudstack-agent keeps crashing with error about not being able to
find the private NIC and that the libvirt.vif.driver is not specified and
is defaulting to BridgeVifDriver and failing

Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
(main:) (logid:) Agent started
Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
(main:) (logid:) Implementation Version is 4.16.1.0
Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
(main:) (logid:) agent.properties found at
/etc/cloudstack/agent/agent.properties
Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
(main:) (logid:) Defaulting to using properties file for storage
Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
(main:) (logid:) Defaulting to the constant time backoff algorithm
Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.utils.LogUtils] (main:)
(logid:) log4j configuration found at /etc/cloudstack/agent/log4j-cloud.xml
Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
(main:) (logid:) Using default Java settings for IPv6 preference for agent
connection
Mar 24 21:50:11 PS-NODE5 java[164130]: INFO  [cloud.agent.Agent] (main:)
(logid:) id is
Mar 24 21:50:11 PS-NODE5 java[164130]: WARN
 [cloud.resource.ServerResourceBase] (main:) (logid:) Nics are not
specified in properties file/db, will try to au
todiscover
Mar 24 21:50:11 PS-NODE5 java[164130]: INFO
 [cloud.resource.ServerResourceBase] (main:) (logid:) Designating private
to be nic cni-podman0
Mar 24 21:50:11 PS-NODE5 java[164130]: ERROR
[kvm.resource.LibvirtComputingResource] (main:) (logid:) uefi properties
file not found due to: Unable to find fi
le uefi.properties.
Mar 24 21:50:11 PS-NODE5 java[164130]: INFO
 [kvm.resource.LibvirtConnection] (main:) (logid:) No existing libvirtd
connection found. Opening a new one
Mar 24 21:50:11 PS-NODE5 java[164130]: WARN
 [kvm.storage.KVMStoragePoolManager] (main:) (logid:) Duplicate
StorageAdaptor type PowerFlex, not loading com.clo
ud.hypervisor.kvm.storage.ScaleIOStorageAdaptor
Mar 24 21:50:11 PS-NODE5 java[164130]: INFO
 [kvm.resource.LibvirtComputingResource] (main:) (logid:) *No
libvirt.vif.driver specified. Defaults to BridgeVifDr*
iver.
Mar 24 21:50:11 PS-NODE5 java[164130]: ERROR
[kvm.resource.LibvirtComputingResource] (main:) (logid:) Failed to get
private nic name
Mar 24 21:50:11 PS-NODE5 java[164130]: ERROR [cloud.agent.AgentShell]
(main:) (logid:) Unable to start agent: Failed to get private nic name

Any idea why the agent would ignore this line?

Thanks,

Re: libvirt.vif.driver ignored in ACS 4.16

Posted by Felipe Polanco <fe...@gmail.com>.
Hi,

I enabled DEBUG mode and now it says the value is found, but still the
agent can't start, seems like I have a missing NIC name on the properties
file but I put all three NICs there.

Error: *Retrieving network interface: null*

# grep network /etc/cloudstack/agent/agent.properties
network.bridge.type=openvswitch
private.network.device=cloudbr0
domr.scripts.dir=scripts/network/domr/kvm
guest.network.device=cloudbr0
public.network.device=cloudbr0

Full output below:

Apr 28 08:59:11 PS-NODE5 systemd[1]: Started CloudStack Agent.
Apr 28 08:59:11 PS-NODE5 java[1767195]: log4j:WARN No appenders could be
found for logger (com.cloud.agent.AgentShell).
Apr 28 08:59:11 PS-NODE5 java[1767195]: log4j:WARN Please initialize the
log4j system properly.
Apr 28 08:59:11 PS-NODE5 java[1767195]: log4j:WARN See
http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Apr 28 08:59:12 PS-NODE5 java[1767195]: INFO  [cloud.agent.AgentShell]
(main:) (logid:) Agent started
Apr 28 08:59:12 PS-NODE5 java[1767195]: INFO  [cloud.agent.AgentShell]
(main:) (logid:) Implementation Version is 4.16.1.0
Apr 28 08:59:12 PS-NODE5 java[1767195]: INFO  [cloud.agent.AgentShell]
(main:) (logid:) agent.properties found at
/etc/cloudstack/agent/agent.properties
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: network.bridge.type
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: resource
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: guest.network.device
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: local.storage.uuid
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: router.aggregation.command.each.timeout
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: port
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: libvirt.vif.driver
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: iscsi.session.cleanup.enabled
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: host
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: pod
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: guid
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: LibvirtComputingResource.id
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: cluster
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: public.network.device
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: private.network.device
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: zone
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: domr.scripts.dir
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: keystore.passphrase
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: vm.migrate.wait
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: workers
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Found property: hypervisor.type
Apr 28 08:59:12 PS-NODE5 java[1767195]: INFO  [cloud.agent.AgentShell]
(main:) (logid:) Defaulting to using properties file for storage
Apr 28 08:59:12 PS-NODE5 java[1767195]: INFO  [cloud.agent.AgentShell]
(main:) (logid:) Defaulting to the constant time backoff algorithm
Apr 28 08:59:12 PS-NODE5 java[1767195]: INFO  [cloud.utils.LogUtils]
(main:) (logid:) log4j configuration found at
/etc/cloudstack/agent/log4j-cloud.xml
Apr 28 08:59:12 PS-NODE5 java[1767195]: INFO  [cloud.agent.AgentShell]
(main:) (logid:) Using default Java settings for IPv6 preference for agent
connection
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.agent.AgentShell]
(main:) (logid:) Checking to see if agent.pid exists.
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.utils.ProcessUtil]
(main:) (logid:) Executing: bash -c echo $PPID
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.utils.ProcessUtil]
(main:) (logid:) Executing while with timeout : 120000
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG [cloud.utils.ProcessUtil]
(main:) (logid:) Execution is successful.
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG
[agent.properties.AgentPropertiesFileHandler] (main:) (logid:) Property
[enable.manually.setting.cpu.topology.on.kvm.vm] has empty or null value.
Using default value [true].
Apr 28 08:59:12 PS-NODE5 java[1767195]: INFO  [cloud.agent.Agent] (main:)
(logid:) id is 13
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG
[cloud.resource.ServerResourceBase] (main:) (logid:) Retrieving network
interface: cloudbr0
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG
[cloud.resource.ServerResourceBase] (main:) (logid:) Retrieving network
interface: cloudbr0
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG
[cloud.resource.ServerResourceBase] (main:) (logid:) *Retrieving network
interface: null*
Apr 28 08:59:12 PS-NODE5 java[1767195]: DEBUG
[cloud.resource.ServerResourceBase] (main:) (logid:) *Retrieving network
interface: null*
Apr 28 08:59:12 PS-NODE5 java[1767195]: WARN
 [cloud.resource.ServerResourceBase] (main:) (logid:) Incorrect details for
private Nic during initialization of ServerResourceBase
Apr 28 08:59:12 PS-NODE5 java[1767195]: ERROR [cloud.agent.AgentShell]
(main:) (logid:) Unable to start agent: Unable to configure
LibvirtComputingResource
Apr 28 08:59:12 PS-NODE5 java[1767195]: Unable to start agent: Unable to
configure LibvirtComputingResource
Apr 28 08:59:12 PS-NODE5 systemd[1]: cloudstack-agent.service: Main process
exited, code=exited, status=66/NOINPUT
Apr 28 08:59:12 PS-NODE5 systemd[1]: cloudstack-agent.service: Failed with
result 'exit-code'.

On Thu, Apr 28, 2022 at 1:33 AM Slavka Peleva <sl...@storpool.com.invalid>
wrote:

> Hi Felipe,
>
> Did you restart the agent after updating the `agent.properties` file? I've
> set this on my lab with the values you have shared, and it gets the correct
> Vif driver.
>
> Best regards,
> Slavka
>
> On Thu, Apr 28, 2022 at 1:28 AM Felipe Polanco <fe...@gmail.com>
> wrote:
>
> > Hi,
> >
> > We are trying to setup Open Vswitch in ACS 4.16 and we have added the
> > following lines to the agent config file and manually created the bridges
> > in OVS:
> >
> > network.bridge.type=openvswitch
> > libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.OvsVifDriver
> >
> > # ovs-vsctl show
> > a6558802-d843-4285-90bc-c884ee9df0d2
> >     Bridge cloudbr0
> >         Port bond0
> >             Interface eth2
> >             Interface eth3
> >         Port cloudbr0
> >             Interface cloudbr0
> >                 type: internal
> >         Port vlan110
> >             tag: 110
> >             Interface vlan110
> >                 type: internal
> >         Port vlan100
> >             tag: 100
> >             Interface vlan100
> >                 type: internal
> >     ovs_version: "2.13.5"
> >
> >
> >
> > However, cloudstack-agent keeps crashing with error about not being able
> to
> > find the private NIC and that the libvirt.vif.driver is not specified and
> > is defaulting to BridgeVifDriver and failing
> >
> > Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
> > (main:) (logid:) Agent started
> > Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
> > (main:) (logid:) Implementation Version is 4.16.1.0
> > Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
> > (main:) (logid:) agent.properties found at
> > /etc/cloudstack/agent/agent.properties
> > Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
> > (main:) (logid:) Defaulting to using properties file for storage
> > Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
> > (main:) (logid:) Defaulting to the constant time backoff algorithm
> > Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.utils.LogUtils]
> (main:)
> > (logid:) log4j configuration found at
> /etc/cloudstack/agent/log4j-cloud.xml
> > Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
> > (main:) (logid:) Using default Java settings for IPv6 preference for
> agent
> > connection
> > Mar 24 21:50:11 PS-NODE5 java[164130]: INFO  [cloud.agent.Agent] (main:)
> > (logid:) id is
> > Mar 24 21:50:11 PS-NODE5 java[164130]: WARN
> >  [cloud.resource.ServerResourceBase] (main:) (logid:) Nics are not
> > specified in properties file/db, will try to au
> > todiscover
> > Mar 24 21:50:11 PS-NODE5 java[164130]: INFO
> >  [cloud.resource.ServerResourceBase] (main:) (logid:) Designating private
> > to be nic cni-podman0
> > Mar 24 21:50:11 PS-NODE5 java[164130]: ERROR
> > [kvm.resource.LibvirtComputingResource] (main:) (logid:) uefi properties
> > file not found due to: Unable to find fi
> > le uefi.properties.
> > Mar 24 21:50:11 PS-NODE5 java[164130]: INFO
> >  [kvm.resource.LibvirtConnection] (main:) (logid:) No existing libvirtd
> > connection found. Opening a new one
> > Mar 24 21:50:11 PS-NODE5 java[164130]: WARN
> >  [kvm.storage.KVMStoragePoolManager] (main:) (logid:) Duplicate
> > StorageAdaptor type PowerFlex, not loading com.clo
> > ud.hypervisor.kvm.storage.ScaleIOStorageAdaptor
> > Mar 24 21:50:11 PS-NODE5 java[164130]: INFO
> >  [kvm.resource.LibvirtComputingResource] (main:) (logid:) *No
> > libvirt.vif.driver specified. Defaults to BridgeVifDr*
> > iver.
> > Mar 24 21:50:11 PS-NODE5 java[164130]: ERROR
> > [kvm.resource.LibvirtComputingResource] (main:) (logid:) Failed to get
> > private nic name
> > Mar 24 21:50:11 PS-NODE5 java[164130]: ERROR [cloud.agent.AgentShell]
> > (main:) (logid:) Unable to start agent: Failed to get private nic name
> >
> > Any idea why the agent would ignore this line?
> >
> > Thanks,
> >
>

Re: libvirt.vif.driver ignored in ACS 4.16

Posted by Slavka Peleva <sl...@storpool.com.INVALID>.
Hi Felipe,

Did you restart the agent after updating the `agent.properties` file? I've
set this on my lab with the values you have shared, and it gets the correct
Vif driver.

Best regards,
Slavka

On Thu, Apr 28, 2022 at 1:28 AM Felipe Polanco <fe...@gmail.com>
wrote:

> Hi,
>
> We are trying to setup Open Vswitch in ACS 4.16 and we have added the
> following lines to the agent config file and manually created the bridges
> in OVS:
>
> network.bridge.type=openvswitch
> libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.OvsVifDriver
>
> # ovs-vsctl show
> a6558802-d843-4285-90bc-c884ee9df0d2
>     Bridge cloudbr0
>         Port bond0
>             Interface eth2
>             Interface eth3
>         Port cloudbr0
>             Interface cloudbr0
>                 type: internal
>         Port vlan110
>             tag: 110
>             Interface vlan110
>                 type: internal
>         Port vlan100
>             tag: 100
>             Interface vlan100
>                 type: internal
>     ovs_version: "2.13.5"
>
>
>
> However, cloudstack-agent keeps crashing with error about not being able to
> find the private NIC and that the libvirt.vif.driver is not specified and
> is defaulting to BridgeVifDriver and failing
>
> Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
> (main:) (logid:) Agent started
> Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
> (main:) (logid:) Implementation Version is 4.16.1.0
> Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
> (main:) (logid:) agent.properties found at
> /etc/cloudstack/agent/agent.properties
> Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
> (main:) (logid:) Defaulting to using properties file for storage
> Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
> (main:) (logid:) Defaulting to the constant time backoff algorithm
> Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.utils.LogUtils] (main:)
> (logid:) log4j configuration found at /etc/cloudstack/agent/log4j-cloud.xml
> Mar 24 21:50:10 PS-NODE5 java[164130]: INFO  [cloud.agent.AgentShell]
> (main:) (logid:) Using default Java settings for IPv6 preference for agent
> connection
> Mar 24 21:50:11 PS-NODE5 java[164130]: INFO  [cloud.agent.Agent] (main:)
> (logid:) id is
> Mar 24 21:50:11 PS-NODE5 java[164130]: WARN
>  [cloud.resource.ServerResourceBase] (main:) (logid:) Nics are not
> specified in properties file/db, will try to au
> todiscover
> Mar 24 21:50:11 PS-NODE5 java[164130]: INFO
>  [cloud.resource.ServerResourceBase] (main:) (logid:) Designating private
> to be nic cni-podman0
> Mar 24 21:50:11 PS-NODE5 java[164130]: ERROR
> [kvm.resource.LibvirtComputingResource] (main:) (logid:) uefi properties
> file not found due to: Unable to find fi
> le uefi.properties.
> Mar 24 21:50:11 PS-NODE5 java[164130]: INFO
>  [kvm.resource.LibvirtConnection] (main:) (logid:) No existing libvirtd
> connection found. Opening a new one
> Mar 24 21:50:11 PS-NODE5 java[164130]: WARN
>  [kvm.storage.KVMStoragePoolManager] (main:) (logid:) Duplicate
> StorageAdaptor type PowerFlex, not loading com.clo
> ud.hypervisor.kvm.storage.ScaleIOStorageAdaptor
> Mar 24 21:50:11 PS-NODE5 java[164130]: INFO
>  [kvm.resource.LibvirtComputingResource] (main:) (logid:) *No
> libvirt.vif.driver specified. Defaults to BridgeVifDr*
> iver.
> Mar 24 21:50:11 PS-NODE5 java[164130]: ERROR
> [kvm.resource.LibvirtComputingResource] (main:) (logid:) Failed to get
> private nic name
> Mar 24 21:50:11 PS-NODE5 java[164130]: ERROR [cloud.agent.AgentShell]
> (main:) (logid:) Unable to start agent: Failed to get private nic name
>
> Any idea why the agent would ignore this line?
>
> Thanks,
>