hub-cap/sneaky-pete — pull request #20 by TimSimpsonR (2011-11-04 01:39:51+00:00)
Title: Added periodic tasks

* Created a new class MySqlNovaUpdater to handle the duties of reporting statuses back to the Nova host.
* Added extra commands to the nova user's sudoers file.
* Added a thread to periodically initiate the periodic_events method.
* Changed format of the JSON incoming messages since it wasn't very intuitive. Now the method name is passed along side the args, by themselves. If we need other stuff we can dig it out later and add it to the interface.
* Changed the Sender and Receiver class to accept an AmqpConnectionPtr in their constructor instead of making their own when I realized giving the Sender its own connection would require another four megabytes. Also made Sender's constructor signature much simpler.
* After discovering that some exceptions completely destroy the ability to use an AMQP channel index again on a connection, added some code to store bad channels to avoid them.
* Refactored MySqlMessageHandler to make it easier to see where new connections to various databases were being created.
* Had to add a hack to MySqlPreparer and MySqlConnection to avoid a permissions issue (the current Python code also avoids this issue, although it uses a different method).
* Fixed a bug in utils::get_ipv4_address(), which had only appeared to work before.
* Overcame a bug where the exchanges and queues don't seem to be declared identically in what may turn out to be the wrong way; I passively declare them and if no error is thrown proceed. However I found out later in testing the Python code in Nova throws-up if the agent declares them first, so this is yet another issue that still needs to be sorted out.