Comment 4 for bug 1441954

Revision history for this message
Alexander Kurenyshev (akurenyshev) wrote :

I think we should re-open this bug, because all of the tests bellow failed.

Case 1:
1) Go to the nailgun container on the master node
2) Edit file /usr/lib/python2.6/site-packages/nailgun/settings.yaml:
    Add this code to the DUMP section to the objects:
      - type: command
        command: sleep 10
        to_file: sleep.txt
        timeout: 5

   Save the file
3) Restart nailgun inside container: supervisorctl restart nailgun
4) SSH to the master node and execute: fuel snapshot

Expected result:
Fuel snapshot should fail because of an operation timeout
Actual result:
There are some errors at the shotgan logs inside mcollective container:
2015-11-03 09:50:25 DEBUG 18297 (driver) Running remote command: host: 10.109.0.2 command: sleep 10
2015-11-03 09:50:30 ERROR 18297 (driver) Error occured: Command failed to finish in 5 seconds

Case 2:
1) Go to the nailgun container on the master node
2) Edit file /usr/lib/python2.6/site-packages/nailgun/settings.yaml:
    Add this code to the DUMP section to the objects:
      - type: command
        command: sleep 11
        to_file: sleep.txt

   Save the file
3) Restart nailgun inside container: supervisorctl restart nailgun
4) Ensure that DEFAULT_TIMEOUT variable is set to 10 secs at the mcollective container /usr/lib/python2.6/site-packages/shotgun/settings.py file
5) SSH to the master node and execute: fuel snapshot

Expected result:
Fuel snapshot command should fail, at least there should be an error message at the logs like at case 1.
Actual result:
Fuel snapshot continues it's work. There are no errors at the shotgun log:
2015-11-03 09:57:33 DEBUG 20454 (driver) Running remote command: host: 10.109.0.2 command: sleep 11
2015-11-03 09:57:44 DEBUG 20454 (utils) Trying to execute command: mkdir -p "/var/www/nailgun/dump/fuel-snapshot-2015-11-03_09-57-30/10.109.0.2/commands"

Case 3:
The same as case 2, but set DEFAULT_TIMEOUT=0 at the mcollective container /usr/lib/python2.6/site-packages/shotgun/settings.py file

Actual and expected results are the same as for case 2. All commands ignore this default timeout.

Maybe I'm wrong about should `fuel snapshot` continue it's work after such errors, or not. But case 2 tells us about default timeout is not working.

Fuel used:
VERSION:
      api: '1.0'
      astute_sha: 0f753467a3f16e4d46e7e9f1979905fb178e4d5b
      build_id: '134'
      build_number: '134'
      feature_groups:
      - mirantis
      fuel-agent_sha: e881f0dabd09af4be4f3e22768b02fe76278e20e
      fuel-createmirror_sha: df6a93f7e2819d3dfa600052b0f901d9594eb0db
      fuel-library_sha: 14b6b2d55840f5271693e26a6544cc43c91989c4
      fuel-nailgun-agent_sha: d66f188a1832a9c23b04884a14ef00fc5605ec6d
      fuel-nailgun_sha: a0f7a4d5dfc8a78846fe57fa6245829643167505
      fuel-ostf_sha: 41aa5059243cbb25d7a80b97f8e1060a502b99dd
      fuelmain_sha: 01c8a575e342f867552075f136826e9b39cda631
      openstack_version: 2015.1.0-8.0
      production: docker
      python-fuelclient_sha: a8298df7de84960f32dccb1cd070255d5828a8ea
      release: '8.0'