projectatomic / commissaire-mvp

A lightweight REST interface for upgrading, restarting, and bootstrapping new hosts into an existing Container Management cluster.
http://commissaire.readthedocs.org/en/latest/
GNU General Public License v3.0
15 stars 9 forks source link

Added KubernetesStoreHandler. #169

Closed ashcrow closed 8 years ago

ashcrow commented 8 years ago
ashcrow commented 8 years ago

@mbarnes I have one more change for this I'm working on related to splitting the hidden attributes in Host in to Kubernetes secrets.

ashcrow commented 8 years ago

@mbarnes Feel free to start review whenever. list is not working correctly so I'll be fixing that later, but other than that things seem to be working fine.

ashcrow commented 8 years ago

Scratch the above comment. I'm refactoring a lot right now.

ashcrow commented 8 years ago

@mbarnes ready whenever you have time. No rush.

mbarnes commented 8 years ago

Nits aside, this is looking really good.

ashcrow commented 8 years ago

:arrow_up:

mbarnes commented 8 years ago

Seeing a few unit test failures...

======================================================================
ERROR: Verify dispatching of operations works properly.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mbarnes/git/github/projectatomic/commissaire/test/test_store_kubestorehandler.py", line 75, in test__dispatch
    self.instance._save_on_namespace.assert_called_once()
  File "/home/mbarnes/commissaire/lib/python2.7/site-packages/mock/mock.py", line 721, in __getattr__
    raise AttributeError(name)
AttributeError: assert_called_once

======================================================================
ERROR: Verify secret retrieval works properly.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mbarnes/git/github/projectatomic/commissaire/test/test_store_kubestorehandler.py", line 115, in test__get_secret
    self.instance._store.get.assert_called_once()
  File "/home/mbarnes/commissaire/lib/python2.7/site-packages/mock/mock.py", line 721, in __getattr__
    raise AttributeError(name)
AttributeError: assert_called_once

======================================================================
ERROR: Make sure we don't get empty secrets.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mbarnes/git/github/projectatomic/commissaire/test/test_store_kubestorehandler.py", line 127, in test__store_secret_without_a_valid_secret
    self.instance._store.get.assert_called_once()
  File "/home/mbarnes/commissaire/lib/python2.7/site-packages/mock/mock.py", line 721, in __getattr__
    raise AttributeError(name)
AttributeError: assert_called_once
ashcrow commented 8 years ago

@mbarnes I can't seem to reproduce those errors. I tried with squashing and without (just in case there was a misplaced fixup) on clean source trees and I get no errors. Can you verify there is no locally modified code as well? Does it also error on the original, non-squashed tree?

mbarnes commented 8 years ago

Did pip install -U -r requirements.txt -r test-requirements.txt and now the failures are magically gone. Wheee!!

mbarnes commented 8 years ago

Merged manually since Travis is confused today. Re-ran all the tests first because I'm confused today.