ubuntu16: fix three issues with ubuntu 16.04 hosts#3227
Conversation
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
| if (network.isActive() == 1) { | ||
| network.destroy(); | ||
| } | ||
| if (network.getAutostart()) { |
There was a problem hiding this comment.
If we destroy the network and set autostart to false, would that cause an issue?
There was a problem hiding this comment.
@rhtyd We have destroyed the default network and did not see any issue in our production.
it seems to break packaging/debian/cloudstack-agent.init, however, as /etc/init.d/cloudstack-agent is not in use any more after systemd changes, it should not be a problem.
There was a problem hiding this comment.
We still do support initd with centos6 packages.
There was a problem hiding this comment.
@rhtyd
I checked the code again, the packaging/debian/cloudstack-agent.init will be packaged in ubuntu/debs and deployed on ubuntu servers as /etc/init.d/cloudstack-agent.
Since we do not support ubuntu 12.04 any more , and systemd is used in ubuntu 14.04 and later, I think this change will not break other functions.
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2632 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-3421)
|
|
I have never seen these issues, but I can understand why they happen. LGTM |
|
@ustcweizhou can you rebase to latest master? We've only deprecated older Ubuntu versions recently, but not in 4.11. |
while add a ubuntu16.04 host with native eth0 (cloudbrX is not configured),
the operation failed and I got the following error in /var/log/cloudstack/agent/setup.log
```
DEBUG:root:execute:ifconfig eth0
DEBUG:root:[Errno 2] No such file or directory
File "/usr/lib/python2.7/dist-packages/cloudutils/serviceConfig.py", line 38, in configration
result = self.config()
File "/usr/lib/python2.7/dist-packages/cloudutils/serviceConfig.py", line 211, in config
super(networkConfigUbuntu, self).cfgNetwork()
File "/usr/lib/python2.7/dist-packages/cloudutils/serviceConfig.py", line 108, in cfgNetwork
device = self.netcfg.getDefaultNetwork()
File "/usr/lib/python2.7/dist-packages/cloudutils/networkConfig.py", line 53, in getDefaultNetwork
pdi = networkConfig.getDevInfo(dev)
File "/usr/lib/python2.7/dist-packages/cloudutils/networkConfig.py", line 157, in getDevInfo
elif networkConfig.isBridge(dev) or networkConfig.isOvsBridge(dev):
```
The issue is caused by commit 9c7cd8c
2017-09-19 16:45 Sigert Goeminne ● CLOUDSTACK-10081: CloudUtils getDevInfo function will now return "bridge" instead o
service libvirt-bin.socket will be started when add a ubuntu 16.04 host DEBUG:root:execute:sudo /usr/sbin/service libvirt-bin start However, libvirt-bin service will be broken by it after restarting Stopping service libvirt-bin.socket will fix the issue. An example is given as below. ``` root@node32:~# /etc/init.d/libvirt-bin restart [ ok ] Restarting libvirt-bin (via systemctl): libvirt-bin.service. root@node32:~# virsh list error: failed to connect to the hypervisor error: no valid connection error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory root@node32:~# systemctl stop libvirt-bin.socket root@node32:~# /etc/init.d/libvirt-bin restart [ ok ] Restarting libvirt-bin (via systemctl): libvirt-bin.service. root@node32:~# virsh list Id Name State ---------------------------------------------------- ```
By default, libvirt will create default network virbr0 on kvm hypervisors. If vm uses the same ip range 192.168.122.0/24, there will be some issues. In some cases, if we run tcpdump inside vm, we will see the ip of kvm hypervisor as source ip.
1e90215 to
fd8fff4
Compare
|
@rhtyd thanks for review. rebased with latest master. |
|
Thanks Wei |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2732 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-3549)
|
Description
This fixes three issues with ubuntu 16.04 hosts
Details can be found in each commit.
Types of changes