Bug 1119661

Summary: The provider cannot run as user: TestEnableDisableIface fails
Product: [Fedora] Fedora Reporter: Jan Safranek <jsafrane>
Component: openlmi-networkingAssignee: Radek Novacek <rnovacek>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 22CC: jsafrane, ovasik, rnovacek, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 19:29:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Jan Safranek 2014-07-15 09:01:10 UTC
To leverage polkit authorization, I am trying to run the networking provider under UID of the remote user. All the tests pass, just this one fails:

ERROR: test_enableDisableIface (test_enable_disable_iface.TestEnableDisableIface)
Traceback (most recent call last):
  File "/mnt/home/project/openlmi-networking/test/test_enable_disable_iface.py", line 82, in test_enableDisableIface
    self.wbemconnection.InvokeMethod("RequestStateChange", self.ethport.path, RequestedState=pywbem.Uint16(DISABLED))
  File "/usr/lib/python2.7/site-packages/pywbem/cim_operations.py", line 817, in InvokeMethod
    result = self.methodcall(MethodName, obj, **params)
  File "/usr/lib/python2.7/site-packages/pywbem/cim_operations.py", line 378, in methodcall
    raise CIMError(code, tt[0][1]['DESCRIPTION'])
CIMError: (1, u'CIM_ERR_FAILED: Unable to set state')

In syslog, I can see:
Jul 15 08:45:14 rawhide cimserver[14692]: networking:[ERROR] /root/openlmi-slave/networking-rawhide/build/openlmi-networking-0.2.2_47_g8399531/src/port.c:167        Unable to open /sys/class/net/ens12/flags: Permission denied

We need ability to bring an interface up/down in NetworkManager, we must not do it by ourselves in the provider - the provider does not have permissions to do so.

Version-Release number of selected component (if applicable):
openlmi-networking git snapshot, commit 4e719dba16c9220326f582bcdc956dbc7a35fa42

Comment 1 Jan Safranek 2014-07-24 14:40:17 UTC
It seems NetworkManager has method to do so, "nmcli device disconnect" and "nmcli con up"

Comment 2 Jaroslav Reznik 2015-03-03 16:07:51 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:

Comment 3 Fedora End Of Life 2016-07-19 19:29:56 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.