lock: fix race in background thread when shard_num changes

shard_num can be unset and set to another value if we don't hold
self.lock while depending on its value. This causes a crash if the
log.error() triggers and tries to format None as an int.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
packaging: add spec file

This was used to build the 1.1 rpms

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
packaging: put requirements on separate lines for rpm

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
packaging: add dependency on python-requests

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
packaging: add init scripts

create log, run, and etc dirs as well

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
packaging: add logrotate config

There's no need to signal running agents since they use
a WatchedFileHandler that detects rotation itself.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
debian: depend on python 2.6 or higher

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
cli: add a default log file

Now that the packages include /var/log/ceph/radosgw-agent, default to
storing logs there, named after the configuration file or
radosgw-agent.log if no config file was used.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>