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

Volume type specific real_usages entries have to be initialised first #2

Open
berendt opened this issue Mar 12, 2018 · 0 comments
Open

Comments

@berendt
Copy link

berendt commented Mar 12, 2018

real_usages["gigabytes_" + volume_types[type_id]] += size

Traceback (most recent call last):                                                                                                                                                                                                       
  File "cinder/quota-sync.py", line 278, in <module>                                                                                                                                                                                     
    main()                                                                                                                                                                                                                               
  File "cinder/quota-sync.py", line 236, in main                                                                                                                                                                                         
    real_usages["volumes_" + volume_types[type_id]] += 1                                                                                                                                                                                 
KeyError: None                                                                                                                                                                                                                           

In https://github.com/cernops/cinder-quota-sync/blob/master/cinder-quota-sync#L239-L240 only the generic counter is initialised. Volume type specific counter is not initialises. Because of this a += 1 does not work.

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

No branches or pull requests

1 participant