ifconfig output parsing should be removed entirely from all charms
Bug #852311 reported by
Patrick Hetu
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nova-cloud-controller (Juju Charms Collection) |
Fix Released
|
Medium
|
Adam Gandelman | ||
rabbitmq-server (Juju Charms Collection) |
Fix Released
|
Medium
|
Unassigned | ||
swift-proxy (Juju Charms Collection) |
Fix Released
|
Medium
|
Unassigned | ||
swift-storage (Juju Charms Collection) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
In charm like mediawiki, munin, mysql, postgresql, rabbitmq-server the IP address is grab with this command:
relation-set ip=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'|head -n 1`
It would be safer to force the C locale with the LANG=C prefix
Changed in charm: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in nova-cloud-controller (juju Charms Collection): | |
status: | Triaged → Fix Released |
Changed in rabbitmq-server (juju Charms Collection): | |
status: | Confirmed → Fix Released |
Changed in swift-proxy (juju Charms Collection): | |
status: | Triaged → Fix Released |
Changed in swift-storage (juju Charms Collection): | |
status: | Triaged → Fix Released |
To post a comment you must log in.
Excerpts from Patrick Hetu's message of Sat Sep 17 01:42:11 UTC 2011:
> Public bug reported:
>
> In charm like mediawiki, munin, mysql, postgresql, rabbitmq-server the
> IP address is grab with this command:
>
> relation-set ip=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' |
> cut -d: -f2 | awk '{ print $1}'|head -n 1`
>
> It would be safer to force the C locale with the LANG=C prefix
Patrick, thanks for the bug report. Agreed that this whole set of code
is entirely too inflexible for long term use.
In fact, we're planning to get rid of that type of interaction entirely, zone/region/ cloud setups, but eventually
in favor of having the hostname embedded in the relations all the
time. The IP works for single-
we'll want to be able to relate things across clouds, so doing things
like this inside charms will make said charms impossible to use for
that purpose.