Bug 1104035 - OSError: [Errno 16] Device or resource busy: '/etc/sysconfig/network-scripts/ifcfg-eth0'
Summary: OSError: [Errno 16] Device or resource busy: '/etc/sysconfig/network-scripts/...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: 3.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.5.0
Assignee: Antoni Segura Puimedon
QA Contact: Martin Pavlik
URL:
Whiteboard: network
: 1115819 (view as bug list)
Depends On:
Blocks: 1108571
TreeView+ depends on / blocked
 
Reported: 2014-06-03 06:58 UTC by Douglas Schilling Landgraf
Modified: 2016-02-10 19:36 UTC (History)
15 users (show)

Fixed In Version: ovirt-3.5.0-beta2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-17 12:33:30 UTC
oVirt Team: Network
Embargoed:


Attachments (Terms of Use)
supervdsm.log (14.68 KB, text/x-log)
2014-06-12 06:38 UTC, Douglas Schilling Landgraf
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 28383 0 master ABANDONED utils: must unpersist files for remove Never
oVirt gerrit 28879 0 master MERGED ifcfg: use oVirt node's to remove files Never

Description Douglas Schilling Landgraf 2014-06-03 06:58:58 UTC
Description of problem:

In ovirt-node rmFile() cannot remove /etc/sysconfig/network-scripts/ifcfg-eth0. To remove a file in ovirt-node it must be unpersisted.

from supervdsm.log
======================

MainThread::DEBUG::2014-06-03 04:48:11,568::netconfpersistence::166::root::(_clearDisk) No existent config to clear.
MainThread::INFO::2014-06-03 04:48:11,568::netconfpersistence::182::root::(save) Saved new config RunningConfig({}, {})
to /var/run/vdsm/netconf/nets/ and /var/run/vdsm/netconf/bonds/
MainThread::DEBUG::2014-06-03 04:48:11,569::netconfpersistence::134::root::(_getConfigs) Non-existing config set.
MainThread::DEBUG::2014-06-03 04:48:11,571::utils::683::root::(execCmd) '/sbin/ifdown eth0' (cwd None)
MainThread::DEBUG::2014-06-03 04:48:11,636::utils::703::root::(execCmd) SUCCESS: <err> = ''; <rc> = 0
MainThread::ERROR::2014-06-03 04:48:11,637::utils::131::root::(rmFile) Removing file:
/etc/sysconfig/network-scripts/ifcfg-eth0 failed
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/vdsm/utils.py", line 125, in rmFile
    os.unlink(fileToRemove)
OSError: [Errno 16] Device or resource busy: '/etc/sysconfig/network-scripts/ifcfg-eth0'
sourceRoute::DEBUG::2014-06-03 05:01:19,506::sourceroutethread::39::root::(process_IN_CLOSE_WRITE_filePath) Responding
to DHCP response in /var/run/vdsm/sourceRoutes/1401771679

Comment 1 Dan Kenigsberg 2014-06-07 22:11:45 UTC
Douglas, do you have more of that supervdsm.log available? I'd like to understand what during which process this bug has occurred - we shouldn't modify rmFile, but the function that called it.

Comment 2 Douglas Schilling Landgraf 2014-06-12 06:38:39 UTC
Created attachment 907956 [details]
supervdsm.log

Comment 3 Douglas Schilling Landgraf 2014-06-12 06:41:28 UTC
(In reply to Dan Kenigsberg from comment #1)
> Douglas, do you have more of that supervdsm.log available? I'd like to
> understand what during which process this bug has occurred - we shouldn't
> modify rmFile, but the function that called it.

Dan, please see the attachment.

Comment 4 Antoni Segura Puimedon 2014-06-12 12:35:08 UTC
I would rather make utils.py have:

def _rmFile_ovirt_node():
    """Checks if it is a persisted file and if so unpersists it"""

def _rmFile():
    """Removes a file"""

if <is ovirt node>:
    rmFile = _rmFile_ovirt_node
else:
    rmFile = _rmFile

Comment 5 Dan Kenigsberg 2014-06-16 08:51:41 UTC
(In reply to Antoni Segura Puimedon from comment #4)
> I would rather make utils.py have:

But most of the times that rmFile is called, the file is not persisted - even on the node. I think we should understand the failing flow, and unpersist the file specifically there, just like we do in vdsm/network/configurators/ifcfg's  _removeFile() (actually the implementation there could be improved).

Comment 6 Douglas Schilling Landgraf 2014-07-09 17:51:06 UTC
*** Bug 1115819 has been marked as a duplicate of this bug. ***

Comment 7 Martin Pavlik 2014-08-07 07:13:01 UTC
how to test this by using node connected to engine?

Comment 8 Douglas Schilling Landgraf 2014-08-07 09:29:55 UTC
Hi Martin,

(In reply to Martin Pavlik from comment #7)
> how to test this by using node connected to engine?

Try to register/approve host, if it gets UP, no issues.
I found this error during registration/approval, the host never the UP and in supervdsm.log I saw: 

"OSError: [Errno 16] Device or resource busy: '/etc/sysconfig/network-scripts/ifcfg-eth0'"

Please let me know if you need any additional info from my side.

Comment 9 Netbulae 2014-08-07 10:36:52 UTC
I saw it when using the admin interface on the node.

Try switching from dhcp to static ip and back again

Comment 10 Fabian Deutsch 2014-08-07 12:37:49 UTC
Toni, might this be related to your heroic persistence changes?

Comment 11 Antoni Segura Puimedon 2014-08-07 13:31:03 UTC
No. IIRC, this had to do with vdsm not calling unpersist. But it was fixed already.

Comment 12 Martin Pavlik 2014-08-08 08:48:27 UTC
verified oVirt Node Hypervisor release 3.1.0_master (20140805.0) (Edited, Unsigned)[root@localhost admin]#

Comment 13 Sandro Bonazzola 2014-10-17 12:33:30 UTC
oVirt 3.5 has been released and should include the fix for this issue.


Note You need to log in before you can comment on or make changes to this bug.