Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alba_backend.presets returns wrong values #515

Open
jeroenmaelbrancke opened this issue Oct 26, 2017 · 5 comments
Open

alba_backend.presets returns wrong values #515

jeroenmaelbrancke opened this issue Oct 26, 2017 · 5 comments

Comments

@jeroenmaelbrancke
Copy link

jeroenmaelbrancke commented Oct 26, 2017

One of our test scenarios is create a preset, sleep 1 second, check if this one exists and delete it again.

Sometimes the created preset is not listed when we run BackendList.get_by_name(albabackend_name).alba_backend.presets

Error from the scenario:

2017-10-26 00:15:48 51100 +0200 - DEV-3N-199-181 - 5442/140354151106304 - scenario-ci_scenario_add_remove_backend/autotests.py - wrapped - 602 - ERROR - Test ci_scenario_add_remove_backend has failed with error: Preset `integrationtests` 
does not exists but it should on backend `mybackend`.
Traceback (most recent call last):
  File "/opt/OpenvStorage/ci/autotests.py", line 459, in wrapped
    result = func(*args, **kwargs)  # Execute the method
  File "/opt/OpenvStorage/ci/scenarios/backend/be_0002_add_update_remove_preset_test/main.py", line 49, in main
    return AddUpdateRemovePreset.validate_add_update_remove_preset()
  File "/opt/OpenvStorage/ci/scenarios/backend/be_0002_add_update_remove_preset_test/main.py", line 144, in validate_add_update_remove_preset
    AddUpdateRemovePreset._add_remove_preset(alba_backend.name, preset_details, preset_def, api)
  File "/opt/OpenvStorage/ci/scenarios/backend/be_0002_add_update_remove_preset_test/main.py", line 193, in _add_remove_preset
    .format(preset_details['name'], albabackend_name)
AssertionError: Preset `integrationtests` does not exists but it should on backend `mybackend`

scenario: https://github.com/openvstorage/integrationtests/blob/master/ci/scenarios/backend/be_0002_add_update_remove_preset_test/main.py#L191

A small test on Alba create-preset, list-preset, delete-preset didn't triggered this issue. So for some reason Framework cached some stuff and do not return the correct values.

@kvanhijf
Copy link
Contributor

kvanhijf commented Oct 26, 2017

I've created a script to add / validate / delete a preset

while True:
    AlbaPresetController.add_preset(alba_backend.guid, name='test', compression='snappy', policies=[[2,2,3,4]], encryption='aes-cbc-256')
    print 'Preset added'
    if not any(pr['name'] for pr in alba_backend.presets if pr['name'] == 'test'):
        break
    print 'Preset present'
    AlbaPresetController.delete_preset(alba_backend.guid, name='test')
    print 'Preset removed'
    if any(pr['name'] for pr in alba_backend.presets if pr['name'] == 'test'):
        print 'Preset still present, while it should have been removed'
        break
    print ''

It has now been running for over 5 minutes and still succeeding, so it does not seem to be an issue in the framework.
Please provide us with more information or investigate this issue further in the integrationtests first

@wimpers
Copy link

wimpers commented Dec 14, 2017

@jeroenmaelbrancke can you please reproduce or if needed close with can't reproduce

@jeroenmaelbrancke
Copy link
Author

@wimpers
Copy link

wimpers commented Dec 21, 2017

@jeroenmaelbrancke can we investigate if it is an integration test issue as Kevin pointed out that his side works (apperently). Maybe this is a caching problem?

@JeffreyDevloo
Copy link
Contributor

Has to be re-evaluated. There were some list-caching issue and these have been resolved in the meantime by openvstorage/framework#1991

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants