heat-cfntools depends on wget and curl. It's redundant.

Bug #1359430 reported by Yukinori Sagara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
heat-cfntools
Fix Released
Medium
Yukinori Sagara

Bug Description

heat-cfntools depends on wget and curl. It's redundant. We should to use one of these.

[root@localhost heat-cfntools]# find . -type f -name '*' | xargs grep -ni curl
./bin/cfn-signal:101:cmd_str = "curl -X PUT -H \'Content-Type:\' --data-binary \'%s\' \"%s\"" % \
[root@localhost heat-cfntools]# find . -type f -name '*' | xargs grep -ni wget
./heat_cfntools/cfntools/cfn_helper.py:595: CommandRunner('wget -O %s %s' % (dest, meta['source'])).run()
./heat_cfntools/cfntools/cfn_helper.py:674: cmd = "wget -q -O - '%s' | gunzip | tar -xvf -" % url
./heat_cfntools/cfntools/cfn_helper.py:676: cmd = "wget -q -O - '%s' | bunzip2 | tar -xvf -" % url
./heat_cfntools/cfntools/cfn_helper.py:679: cmd = "wget -q -O '%s' '%s' && unzip -o '%s'" % (tmp, url, tmp)
./heat_cfntools/cfntools/cfn_helper.py:681: cmd = "wget -q -O - '%s' | tar -xvf -" % url
./heat_cfntools/cfntools/cfn_helper.py:684: cmd = "wget -q -O - '%s' | gunzip > '%s'" % (url, r)
./heat_cfntools/cfntools/cfn_helper.py:687: cmd = "wget -q -O - '%s' | bunzip2 > '%s'" % (url, r)
./heat_cfntools/cfntools/cfn_helper.py:1152: CommandRunner('wget -O %s %s' % (cache_path, url)).run()
./heat_cfntools/tests/test_cfn_helper.py:1012: def test_nova_meta_wget(self):
./heat_cfntools/tests/test_cfn_helper.py:1042: 'wget -O %s %s' % (cache_path, url)],
./heat_cfntools/tests/test_cfn_helper.py:1054: def test_nova_meta_wget_corrupt(self):
./heat_cfntools/tests/test_cfn_helper.py:1077: 'wget -O %s %s' % (cache_path, url)],
./heat_cfntools/tests/test_cfn_helper.py:1089: def test_nova_meta_wget_failed(self):
./heat_cfntools/tests/test_cfn_helper.py:1103: 'wget -O %s %s' % (cache_path, url)],
./heat_cfntools/tests/test_cfn_helper.py:1227: er = "mkdir -p '%s'; cd '%s'; wget -q -O - '%s' | gunzip | tar -xvf -"
./heat_cfntools/tests/test_cfn_helper.py:1230: self.mock_cmd_run(cmd).AndReturn(FakePOpen('Wget good'))
./heat_cfntools/tests/test_cfn_helper.py:1251: er = "mkdir -p '%s'; cd '%s'; wget -q -O - '%s' | %s | tar -xvf -"
./heat_cfntools/tests/test_cfn_helper.py:1278: er = "mkdir -p '%s'; cd '%s'; wget -q -O '%s' '%s' && unzip -o '%s'"
./heat_cfntools/tests/test_cfn_helper.py:1288: er = "mkdir -p '%s'; cd '%s'; wget -q -O - '%s' | %s > '%s'"

Revision history for this message
Steve Baker (steve-stevebaker) wrote :

I think curl is considered more widely installed by default

Changed in heat-cfntools:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Yukinori Sagara (sagara) wrote :

> I think curl is considered more widely installed by default

I agree.

If there aren't any problems, I would like to write a patch soon.

Changed in heat-cfntools:
assignee: nobody → Yukinori Sagara (sagara177)
Revision history for this message
Jeff Peeler (jpeeler-z) wrote :

Yukinori, how long do you think before you can get a patch written? Need to eliminate wget usage sooner than I thought.

Revision history for this message
Yukinori Sagara (sagara) wrote :

I will write a patch, and send it to Gerrit today. Is this OK?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat-cfntools (master)

Fix proposed to branch: master
Review: https://review.openstack.org/116143

Changed in heat-cfntools:
status: Triaged → In Progress
Revision history for this message
Yukinori Sagara (sagara) wrote :

I wrote a patch. please review it.

https://review.openstack.org/#/c/116143/

Revision history for this message
Yukinori Sagara (sagara) wrote :

Gerrit/Jenkins has failed. heat-cfntools has a random order of command execution, but existing test code the order is specified.
We need to improve test code of heat-cfntools firstly. I will open a new bug ticket.

Revision history for this message
Yukinori Sagara (sagara) wrote :

> We need to improve test code of heat-cfntools firstly. I will open a new bug ticket.

I reported.

https://bugs.launchpad.net/heat-cfntools/+bug/1360212

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat-cfntools (master)

Reviewed: https://review.openstack.org/116143
Committed: https://git.openstack.org/cgit/openstack/heat-cfntools/commit/?id=8ef88a6e864fa49cdc6dda9b1c701a29e0557253
Submitter: Jenkins
Branch: master

commit 8ef88a6e864fa49cdc6dda9b1c701a29e0557253
Author: Yukinori Sagara <email address hidden>
Date: Fri Aug 22 18:30:37 2014 +0900

    Change wget to curl for using both of them is redundant

    heat-cfntools depends on wget and curl. It's redundant.
    Since the curl is widely used, replace wget command to curl.

    Change-Id: I691bdc046bd72a44c11f25e359c5036ae1a9e86b
    Closes-Bug: 1359430

Changed in heat-cfntools:
status: In Progress → Fix Committed
Changed in heat-cfntools:
milestone: none → v1.2.8
Changed in heat-cfntools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.