Bug 1119661 - The provider cannot run as user: TestEnableDisableIface fails
Summary: The provider cannot run as user: TestEnableDisableIface fails
Alias: None
Product: Fedora
Classification: Fedora
Component: openlmi-networking
Version: 22
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Radek Novacek
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-15 09:01 UTC by Jan Safranek
Modified: 2016-12-01 00:34 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-07-19 19:29:56 UTC
Type: Bug

Attachments (Terms of Use)

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.

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