Can't get os-faults to work

Bug #1836736 reported by Lauritz Rasbach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-faults
Fix Released
Undecided
Unassigned

Bug Description

Hello,

I have been trying to inject faults in a 3 Node (2 compute nodes) OpenStack cloud. The ssh connection to the cloud works fine. Now I am struggling with most of the operations provided by os-faults.

The service 'restart' and 'terminate' operations work just fine.

'Freeze' gives the output:
File “/Users/User/Library/Python/3.7/lib/python/site-packages/yaml/representer.py“, line 231,in represent_undefined raise RepresenterError(cannot represent an object“, data) yaml.representer.RepresenterError:(’cannot represent an object’, <Signals.SIGSTOP: 17>)

And 'kill':
File “/Users/User/Library/Python/3.7/lib/python/site-packages/yaml/representer.py“, line 231,in represent_undefined raise RepresenterError(cannot represent an object“, data) yaml.representer.RepresenterError:(’cannot represent an object’, <Signals.SIGKILL: 9>)

The 'start' command tells me, that the service I want to start can't be found on the given node(s), although I terminated it successfully before.

'Plug' requires a port but I don't get how the command is supposed to look like. (same with unplug)

The 'oom' command is returning a 'NotImplementedError'

For 'disconnect' and 'connect' again I can't figure out what the CLI command is supposed to look like.

'poweroff', 'poweron', 'reset' and 'shutdown' all tell me that libvirt-python is required, but I've tried installing it literally everywhere (every node + the machine sending the os-fault commands) and it still gives me the same messages.

'Reboot' on the other hand just tells me that the execution failed with an AnsibleExecutionException.

'Stress' seems to require a target argument, but I don't know what that could be.

I know this is a lot and I am sorry if this is the wrong place to ask, but I couldn't find any info about forums for questions.
If required I can also send the entire Error Messages for each command.

Thank you,
Lauritz Rasbach

Revision history for this message
Ilya Shakhat (shakhat) wrote :

Well, it may be broken.

Not sure about other users, but I use only 'terminate', 'restart', 'kill' and recent 'plug'/'unplug'. For me 'kill' works, but I use python 3.6 - can check on 3.7. Commands 'plug' and 'unplug' require port number and protocol to be specified in a service (https://os-faults.readthedocs.io/en/latest/quickstart/config_spec.html#services). Both commands allow to block one port via iptables (ideally this should be abstracted to support e.g. firewalld and many ports instead of one, the current implementation is a bit hackish).

Command 'start' has a design flaw - it performs discover trying to find where the service runs and does so using ps, and since a service is off it obviously cannot find it. The workaround is to always specify a host, e.g. 'start nova-api service on controller host'.

Commands 'connect' and 'disconnect' were designed for already removed Fuel driver - for the rest they they are not implemented. All remaining command also were used some time ago...

To sum up: I can verify the lib on python 3.7 and check whether libvirt-based command can be easily fixed (they were in a good shape couple years ago).

Ilya Shakhat (shakhat)
Changed in os-faults:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-faults (master)

Reviewed: https://review.opendev.org/671736
Committed: https://git.openstack.org/cgit/performa/os-faults/commit/?id=e55bd553aa67180394fbe5c104675eae6e5686e7
Submitter: Zuul
Branch: master

commit e55bd553aa67180394fbe5c104675eae6e5686e7
Author: Ilya Shakhat <email address hidden>
Date: Fri Jul 19 16:02:58 2019 +0200

    Fix representation of signal.SIG* constants

    Pass signals as strings instead of using python constants
    which depend on host system and have different types on py27 vs py3.

    Change-Id: Ib8d7136bb3aed125a987678672142ce72e33af6f
    Closes-bug: #1836736

Changed in os-faults:
status: Confirmed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.opendev.org/671742
Committed: https://git.openstack.org/cgit/performa/os-faults/commit/?id=ab0930ec6c66b655ac1c546bde0a79f6899ed94f
Submitter: Zuul
Branch: master

commit ab0930ec6c66b655ac1c546bde0a79f6899ed94f
Author: Ilya Shakhat <email address hidden>
Date: Fri Jul 19 16:22:58 2019 +0200

    Fix reboot command

    Change-Id: Ie7598a69f336618a6daab66f3854d9ebcebe5b3a
    Closes-Bug: #1836736

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.opendev.org/671758
Committed: https://git.openstack.org/cgit/performa/os-faults/commit/?id=cbab3865e8a1412226f176f4ceac63352cd3d221
Submitter: Zuul
Branch: master

commit cbab3865e8a1412226f176f4ceac63352cd3d221
Author: Ilya Shakhat <email address hidden>
Date: Fri Jul 19 17:16:17 2019 +0200

    Document how to use libvirt driver

    Change-Id: I5cba6ee970b64f4a63317169c3ab90613fbe0bb6
    Closes-Bug: #1836736

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.