avocado-framework / avocado-vt

Avocado VT Plugin
https://avocado-vt.readthedocs.org/
Other
83 stars 241 forks source link

Fix OSError when checking the mount status #3963

Open cliping opened 1 month ago

cliping commented 1 month ago

Wrong nfs server cleanup order causes OSError. So update code.

cliping commented 1 week ago

Before:

2024-08-30 22:27:40,658 process L0470 DEBUG| [stdout] nfsd /proc/fs/nfsd nfsd rw,relatime 0 0 2024-08-30 22:27:40,658 process L0470 DEBUG| [stdout] 127.0.0.1:/var/lib/avocado/data/avocado-vt/images /var/lib/libvirt/migrate nfs4 rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=127.0.0.1,local_lock=none,addr=127.0.0.1 0 0 2024-08-30 22:27:40,658 output L0702 DEBUG| [stderr] Exception in thread 2024-08-30 22:27:40,658 output L0702 DEBUG| [stderr] cat /proc/mounts-stdout 2024-08-30 22:27:40,659 output L0702 DEBUG| [stderr] : 2024-08-30 22:27:40,659 output L0702 DEBUG| [stderr] Traceback (most recent call last): 2024-08-30 22:27:40,659 output L0702 DEBUG| [stderr] File "/usr/lib64/python3.9/threading.py", line 980, in _bootstrap_inner 2024-08-30 22:27:40,660 output L0702 DEBUG| [stderr]
2024-08-30 22:27:40,660 output L0702 DEBUG| [stderr] self.run() 2024-08-30 22:27:40,660 output L0702 DEBUG| [stderr] 2024-08-30 22:27:40,660 output L0702 DEBUG| [stderr] File "/usr/lib64/python3.9/threading.py", line 917, in run 2024-08-30 22:27:40,661 output L0702 DEBUG| [stderr]
2024-08-30 22:27:40,661 output L0702 DEBUG| [stderr] self._target(*self._args, **self._kwargs) 2024-08-30 22:27:40,661 output L0702 DEBUG| [stderr] 2024-08-30 22:27:40,661 output L0702 DEBUG| [stderr] File "/var/ci/libvirt-ci/runtest/avocado-vt/avocado/avocado/utils/process.py", line 488, in _drainer 2024-08-30 22:27:40,662 output L0702 DEBUG| [stderr]
2024-08-30 22:27:40,662 output L0702 DEBUG| [stderr] tmp = os.read(self.fd, 8192) 2024-08-30 22:27:40,662 output L0702 DEBUG| [stderr] 2024-08-30 22:27:40,662 output L0702 DEBUG| [stderr] OSError 2024-08-30 22:27:40,663 output L0702 DEBUG| [stderr] : 2024-08-30 22:27:40,663 output L0702 DEBUG| [stderr] [Errno 9] Bad file descriptor 2024-08-30 22:27:40,663 output L0702 DEBUG| [stderr]

After: (1/1) type_specific.io-github-autotest-libvirt.virsh.live_migration.listen_address.all_ipaddrs.ipv4.migrateuri_ipv6_addr.non_p2p_live.without_postcopy: PASS (112.43 s)