redhat-openstack / infrared

Plugin based framework that aims to provide an easy-to-use CLI for Ansible based projects
https://infrared.readthedocs.io/en/latest/index.html
Apache License 2.0
100 stars 95 forks source link

inspection_iprange hardcoded #322

Open bengland2 opened 6 years ago

bengland2 commented 6 years ago

I was using a system with 1/2 TB RAM to test scale-out of OpenStack and ceph-ansible, and ran into a place where address ranges are hardcoded in plugins/tripleo-undercloud/templates/undercloud.conf.j2 . To work around it, I made the change below, but would it be possible to add this ip range to one of the vars or defaults files so that it can be easily changed?

[root@c08-h01-r930 infrared]# git diff diff --git a/plugins/tripleo-undercloud/templates/undercloud.conf.j2 b/plugins/tripleo-undercloud/templates/undercloud.conf.j2 index df00d57..63686b6 100644 --- a/plugins/tripleo-undercloud/templates/undercloud.conf.j2 +++ b/plugins/tripleo-undercloud/templates/undercloud.conf.j2 @@ -26,5 +26,5 @@ will fail. #} {% if install.version == '7' or install.version == 'kilo' %} discovery_iprange = 192.168.24.100,192.168.24.120 {% else %} -inspection_iprange = 192.168.24.100,192.168.24.120 +inspection_iprange = 192.168.24.200,192.168.24.220 {% endif %}

obaranov commented 6 years ago

@bengland2, I think you can use --config-file and --config-options CLI options. Check here: https://github.com/redhat-openstack/infrared/blob/master/plugins/tripleo-undercloud/plugin.spec#L49-L62

First should allow you to use a custom config file. The second one allows to set options in default config file.

Let me know if that helps.

bengland2 commented 6 years ago

my ip range was off by 1, should have been .201-.221. Thanks for the suggestion, I'll try it.