Merge lp:~usrleon/nova/small_fixes into lp:~hudson-openstack/nova/trunk

Proposed by Max Lvov
Status: Work in progress
Proposed branch: lp:~usrleon/nova/small_fixes
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 71 lines (+23/-5)
4 files modified
bin/nova-manage (+14/-0)
nova/CA/openssl.cnf.tmpl (+1/-1)
nova/service.py (+1/-1)
nova/utils.py (+7/-3)
To merge this branch: bzr merge lp:~usrleon/nova/small_fixes
Reviewer Review Type Date Requested Status
Josh Kearney (community) Needs Information
Devin Carlen (community) Approve
Review via email: mp+58934@code.launchpad.net

This proposal has been superseded by a proposal from 2011-05-04.

Description of the change

1 Set default paths for nova.conf and api-paste.ini to /etc/nova/
2 Changed countryName policy because https://bugs.launchpad.net/nova/+bug/724317 still affected.

To post a comment you must log in.
Revision history for this message
Jay Pipes (jaypipes) wrote :

Hi!

I'm not sure that I agree with changing the default location of nova.conf from the current working directory to /etc/nova. Generally, I think these kind of things belong more to the realm of packaging or configuration management, and specifying a location other than the current working directory assumes a certain setup. Granted, /etc/nova is standard deployment for configuration files, but I still think we should leave that up to the configuration management tool and/or packaging scripts...

The LDAP change I will politely defer to Ryan Lane or someone other LDAP expert (not me!) :)

Thoughts?

Revision history for this message
Vish Ishaya (vishvananda) wrote :

I agree in general with Jay's point. You can always specify the file on the command line as well.

The LDAP change seems fine, since match seems to have that weird issue where 'California' != 'California' for some reason.

Vish

On Apr 26, 2011, at 7:36 AM, Jay Pipes wrote:

> Hi!
>
> I'm not sure that I agree with changing the default location of nova.conf from the current working directory to /etc/nova. Generally, I think these kind of things belong more to the realm of packaging or configuration management, and specifying a location other than the current working directory assumes a certain setup. Granted, /etc/nova is standard deployment for configuration files, but I still think we should leave that up to the configuration management tool and/or packaging scripts...
>
> The LDAP change I will politely defer to Ryan Lane or someone other LDAP expert (not me!) :)
>
> Thoughts?
> --
> https://code.launchpad.net/~usrleon/nova/small_fixes/+merge/58934
> You are subscribed to branch lp:nova.

Revision history for this message
Max Lvov (usrleon) wrote :

I just tired type "--flagfile /etc/nova/nova.conf" and often forgot it, then I supposed Im not alone :)
Bug with openssl in my case possible caused russian locale on my system, but Im not sure.

Revision history for this message
Devin Carlen (devcamcar) wrote :

I actually like the change to the default flagfile location. In 99% of installations it's going to be in /etc/nova, and it causes a fair amount of confusion in the community. I wouldn't mind seeing this change go in.

review: Approve
Revision history for this message
Ilya Alekseyev (ilyaalekseyev) wrote :

Gents,

we have hyper-v virt driver in nova, but /etc/nova/nova.conf seems not very fair for windows.
Policy relaxation seems good.

Just 2 cents.

Revision history for this message
Max Lvov (usrleon) wrote :

Ok, I suggest 1034 instead 1031, but I not understand why it looks nova.conf in script directory, not current, home, etc.

Revision history for this message
Josh Kearney (jk0) wrote :

Why not have it look in both the current directory and /etc/nova? If there is no nova.conf in ., default to /etc/nova.

review: Needs Information
Revision history for this message
Max Lvov (usrleon) wrote :

Superseded for clarify target changes, sorry my mistakes with launchpad workflow.

Unmerged revisions

1036. By Max Lvov

default flagfile search in: scriptdir->current dir->/etc/nova

1035. By Max Lvov

'nova-manage image delete <image id or name>' function implementation

1034. By Max Lvov

default_flagfile in /etc if doesn't exist in script dir

1033. By Max Lvov

Default path for paste to /etc/nova/api-paste.ini

1032. By Max Lvov

countryName=supplied otherwise 'match' causes error in some cases

1031. By Max Lvov

default_flagfile full path

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/nova-manage'
--- bin/nova-manage 2011-04-30 02:46:29 +0000
+++ bin/nova-manage 2011-05-03 11:17:50 +0000
@@ -1044,6 +1044,20 @@
1044 self._convert_images(other_images)1044 self._convert_images(other_images)
1045 self._convert_images(machine_images)1045 self._convert_images(machine_images)
10461046
1047 def delete(self, image_id_or_name):
1048 """Removes image from image_service by id or name
1049 arguments: image id or name"""
1050 try:
1051 image = self.image_service.show(context, image_id_or_name)
1052 except exception.NotFound:
1053 try:
1054 image = self.image_service.show_by_name(context, image_id_or_name)
1055 except exception.NotFound:
1056 print "Can't find image '{}'".format(image_id_or_name)
1057 return
1058 self.image_service.delete(context, image['id'])
1059 print "Image id='{0}' name='{1}' deleted successfully".format(image['id'], image['name'])
1060
10471061
1048CATEGORIES = [1062CATEGORIES = [
1049 ('user', UserCommands),1063 ('user', UserCommands),
10501064
=== modified file 'nova/CA/openssl.cnf.tmpl'
--- nova/CA/openssl.cnf.tmpl 2011-04-08 16:22:09 +0000
+++ nova/CA/openssl.cnf.tmpl 2011-05-03 11:17:50 +0000
@@ -46,7 +46,7 @@
46# RHEL 6 and Fedora 14 (using openssl-1.0.0-4.el6.x86_64 or46# RHEL 6 and Fedora 14 (using openssl-1.0.0-4.el6.x86_64 or
47# openssl-1.0.0d-1.fc14.x86_64)47# openssl-1.0.0d-1.fc14.x86_64)
48[ policy_match ]48[ policy_match ]
49countryName = match49countryName = supplied
50stateOrProvinceName = supplied50stateOrProvinceName = supplied
51organizationName = optional51organizationName = optional
52organizationalUnitName = optional52organizationalUnitName = optional
5353
=== modified file 'nova/service.py'
--- nova/service.py 2011-04-20 19:08:22 +0000
+++ nova/service.py 2011-05-03 11:17:50 +0000
@@ -52,7 +52,7 @@
52flags.DEFINE_string('osapi_listen', "0.0.0.0",52flags.DEFINE_string('osapi_listen', "0.0.0.0",
53 'IP address for OpenStack API to listen')53 'IP address for OpenStack API to listen')
54flags.DEFINE_integer('osapi_listen_port', 8774, 'port for os api to listen')54flags.DEFINE_integer('osapi_listen_port', 8774, 'port for os api to listen')
55flags.DEFINE_string('api_paste_config', "api-paste.ini",55flags.DEFINE_string('api_paste_config', "/etc/nova/api-paste.ini",
56 'File name for the paste.deploy config for nova-api')56 'File name for the paste.deploy config for nova-api')
5757
5858
5959
=== modified file 'nova/utils.py'
--- nova/utils.py 2011-04-22 19:44:24 +0000
+++ nova/utils.py 2011-05-03 11:17:50 +0000
@@ -232,9 +232,13 @@
232 # turn relative filename into an absolute path232 # turn relative filename into an absolute path
233 script_dir = os.path.dirname(inspect.stack()[-1][1])233 script_dir = os.path.dirname(inspect.stack()[-1][1])
234 filename = os.path.abspath(os.path.join(script_dir, filename))234 filename = os.path.abspath(os.path.join(script_dir, filename))
235 if os.path.exists(filename):235 if not os.path.exists(filename):
236 flagfile = ['--flagfile=%s' % filename]236 filename = "./nova.conf"
237 sys.argv = sys.argv[:1] + flagfile + sys.argv[1:]237 if not os.path.exists(filename):
238 filename = '/etc/nova/nova.conf'
239 flagfile = ['--flagfile=%s' % filename]
240 sys.argv = sys.argv[:1] + flagfile + sys.argv[1:]
241
238242
239243
240def debug(arg):244def debug(arg):