Merge ~smoser/cloud-init:bug/1677710-ds-identify-fix-maas-detect into cloud-init:master
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Merged at revision: | a68e7d50d25e774018588a5312c7698c38ec4de4 | ||||
| Proposed branch: | ~smoser/cloud-init:bug/1677710-ds-identify-fix-maas-detect | ||||
| Merge into: | cloud-init:master | ||||
| Diff against target: |
75 lines (+17/-16) 1 file modified
tools/ds-identify (+17/-16) |
||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Ryan Harper | 2017-03-30 | Approve on 2017-03-30 | |
| Server Team CI bot | continuous-integration | Approve on 2017-03-30 | |
|
Review via email:
|
|||
Commit Message
ds-identify: fix detecting of maas datasource.
The reading of MAAS datasource configuration was simply broken.
it was looking in /etc/cloud/
/etc/cloud/
along side here there is also:
* doc improvement on check_config
* remove the path restrictions when searching for values in both
maas and ovf_vmware_
performance as check_config's parsing is slow.
* change to maas to search all config files rather than restricting
to a subset as it tried before. that was done for
* better variable names.
- rename path_cloud_confd to path_etc_cloud
- PATH_ETC_CLOUD: /etc/cloud
- PATH_ETC_CI_CFG: /etc/cloud/
- PATH_ETC_CI_CFG_D: /etc/cloud/
LP: #1677710
| Scott Moser (smoser) wrote : | # |
PASSED: Continuous integration, rev:a68e7d50d25
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/


here is my little attempt at getting some speed info on this
$ cat foo.sh
#!/bin/sh
if [ $# -eq 0 ] || [ "$1" = "-h" -o "$1" = "--help" ]; then
cat <<EOF
Usage: ${0##*/} num [prog [arg [..]]]
run prog with arguments num times.
if no program or args, default is to run:
check_config datasource_list
$ time ${0} 10 check_config datasource_list
EOF
exit
fi
. /usr/lib/ cloud-init/ ds-identify
num=$1
nums=$(seq 1 "$num")
shift
[ $# -eq 0 ] && set -- check_config datasource_list
_RET=""; _RET_fname=""
echo "$num runs of: $*" ${_RET_ fname}"
for i in $nums; do "$@"; done
ret=$?
echo "returned: $?"
echo "_RET=$_RET"
echo "_RET_fname=