add consoleauth patch

This commit is contained in:
Vladimir Kuklin 2012-10-31 14:34:31 +04:00
parent 011b55c84b
commit 95b15ac14e
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,17 @@
--- a/manager.py 2012-10-31 14:09:36.153257689 +0400
+++ b/manager.py 2012-10-31 14:10:01.261260402 +0400
@@ -65,11 +65,11 @@
'internal_access_path': internal_access_path,
'last_activity_at': time.time()}
data = jsonutils.dumps(token_dict)
- self.mc.set(token, data, FLAGS.console_token_ttl)
+ self.mc.set(token.encode('UTF-8'), data, FLAGS.console_token_ttl)
LOG.audit(_("Received Token: %(token)s, %(token_dict)s)"), locals())
def check_token(self, context, token):
- token_str = self.mc.get(token)
+ token_str = self.mc.get(token.encode('UTF-8'))
token_valid = (token_str is not None)
LOG.audit(_("Checking Token: %(token)s, %(token_valid)s)"), locals())
if token_valid:

View File

@ -11,6 +11,18 @@ class nova::consoleauth(
include nova::params
file { "/tmp/consoleauth-memcached.patch":
ensure => present,
source => 'puppet:///modules/nova/consoleauth-memcached.patch'
}
exec { 'patch-consoleauth':
path => ["/usr/bin", "/usr/sbin"],
onlyif => "patch -t -N -p1 --dry-run -d /usr/lib/${::nova::params::python_path}/nova/consoleauth/ --reject-file=/dev/null < /tmp/consoleauth-memcached.patch",
command => "/usr/bin/patch -p1 -d /usr/lib/${::nova::params::python_path}/nova/consoleauth </tmp/consoleauth-memcached.patch",
require => [ [File['/tmp/consoleauth-memcached.patch']],[Package['patch', 'python-nova']]],
} ->
nova::generic_service { 'consoleauth':
enabled => $enabled,
package_name => $::nova::params::consoleauth_package_name,