--xenapi_connection_password=Cloud$erver cannot be recognized

Asked by sealove

I have following flags in nova.conf:
--connection_type=xenapi
--xenapi_connection_url=https://10.0.0.3
--xenapi_connection_username=root
--xenapi_connection_password=Cloud$erver

However, it seems nova-compute cannot recognize the password in flag while my xenserver password indeed contains $ character. What can I do with this $?

Here is the log of nova-compute:
2011-08-21 05:51:14,185 ERROR nova [-] in Service.create()
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/service.py", line 270, in serve
(nova): TRACE: services = [Service.create()]
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/service.py", line 173, in create
(nova): TRACE: report_interval, periodic_interval)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/service.py", line 73, in __init__
(nova): TRACE: self.manager = manager_class(host=self.host, *args, **kwargs)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/compute/manager.py", line 127, in __init__
(nova): TRACE: utils.import_object(compute_driver),
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/utils.py", line 76, in import_object
(nova): TRACE: return cls()
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/connection.py", line 69, in get_connection
(nova): TRACE: conn = xenapi_conn.get_connection(read_only)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/xenapi_conn.py", line 152, in get_connection
(nova): TRACE: url = FLAGS.xenapi_connection_url
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/flags.py", line 138, in __getattr__
(nova): TRACE: self.ParseNewFlags()
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/flags.py", line 123, in ParseNewFlags
(nova): TRACE: setattr(self, k, getattr(new_flags, k))
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/flags.py", line 143, in __getattr__
(nova): TRACE: return tmpl.substitute(StrWrapper(context))
(nova): TRACE: File "/usr/lib/python2.6/string.py", line 172, in substitute
(nova): TRACE: return self.pattern.sub(convert, self.template)
(nova): TRACE: File "/usr/lib/python2.6/string.py", line 162, in convert
(nova): TRACE: val = mapping[named]
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/flags.py", line 160, in __getitem__
(nova): TRACE: raise KeyError(name)
(nova): TRACE: KeyError: 'erver'
(nova): TRACE:
2011-08-21 05:51:14,197 CRITICAL nova [-] 'erver'
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/bin/nova-compute", line 48, in <module>
(nova): TRACE: service.serve()
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/service.py", line 280, in serve
(nova): TRACE: FLAGS.ParseNewFlags()
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/flags.py", line 123, in ParseNewFlags
(nova): TRACE: setattr(self, k, getattr(new_flags, k))
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/flags.py", line 143, in __getattr__
(nova): TRACE: return tmpl.substitute(StrWrapper(context))
(nova): TRACE: File "/usr/lib/python2.6/string.py", line 172, in substitute
(nova): TRACE: return self.pattern.sub(convert, self.template)
(nova): TRACE: File "/usr/lib/python2.6/string.py", line 162, in convert
(nova): TRACE: val = mapping[named]
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/flags.py", line 160, in __getitem__
(nova): TRACE: raise KeyError(name)
(nova): TRACE: KeyError: 'erver'
(nova): TRACE:

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Soren Hansen
Solved:
Last query:
Last reply:
Revision history for this message
Best Soren Hansen (soren) said :
#1

2011/8/21 sealove <email address hidden>:
> New question #168721 on OpenStack Compute (nova):
> https://answers.launchpad.net/nova/+question/168721
>
> I have following flags in nova.conf:
> --connection_type=xenapi
> --xenapi_connection_url=https://10.0.0.3
> --xenapi_connection_username=root
> --xenapi_connection_password=Cloud$erver

"--xenapi_connection_password=Cloud$$erver" should do the trick.

--
Soren Hansen        | http://linux2go.dk/
Ubuntu Developer    | http://www.ubuntu.com/
OpenStack Developer | http://www.openstack.org/

Revision history for this message
sealove (huijun-wu-2010) said :
#2

Thanks Soren Hansen, that solved my question.