devstack-version does not handle merge commit messages properly

Bug #1701411 reported by Sam Wan
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Critical
Manjeet Singh Bhatia

Bug Description

devstack failed because devstack-version does not handle unmatched single quote.
======
/usr/local/bin/devstack-version: line 3: unexpected EOF while looking for matching `''
/usr/local/bin/devstack-version: line 6: syntax error: unexpected end of file
======

devstack-version
======
#!/bin/bash

echo "DevStack Version: pike - 248d54b51b049355b22cf17a1473415ad7661f56 Merge "Ensure keepalive isn't used on uwsgi http mode" 2017-06-29 23:03:42 +0000"
echo "OS Version: Ubuntu 16.04 xenial"
======

There is a unmatched single quote in the subject line, so echo can not handle it.

Sam Wan (sam-wan)
Changed in devstack:
assignee: nobody → Sam Wan (sam-wan)
Revision history for this message
Li juan Li (lilljllj) wrote :

meeting with the same error

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

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

Changed in devstack:
status: New → In Progress
Revision history for this message
Sam Wan (sam-wan) wrote : Re: devstack-version does not handle single quote properly

Hi Juanli,

Please try my fix: https://review.openstack.org/479118

Matt Riedemann (mriedem)
Changed in devstack:
importance: Undecided → Critical
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (master)

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

Changed in devstack:
assignee: Sam Wan (sam-wan) → Matt Riedemann (mriedem)
Revision history for this message
Matt Riedemann (mriedem) wrote : Re: devstack-version does not handle single quote properly
Revision history for this message
Matt Riedemann (mriedem) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on devstack (master)

Change abandoned by Matt Riedemann (<email address hidden>) on branch: master
Review: https://review.openstack.org/479135
Reason: https://review.openstack.org/#/c/479108/

Revision history for this message
Sean Dague (sdague) wrote : Re: devstack-version does not handle single quote properly

Wow, that's a really interesting slip through the gate issue, as this only was triggered on Merge commits, which aren't tested in the gate. The real issue here is that the merge commits include double quotes, which bring us out of the string, then the single quote is assumed meaningful, but it is not. :(

summary: - devstack-version does not handle single quote properly
+ devstack-version does not handle merge commit messages properly
Matt Riedemann (mriedem)
Changed in devstack:
assignee: Matt Riedemann (mriedem) → Manjeet Singh Bhatia (manjeet-s-bhatia)
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on devstack (master)

Change abandoned by Sam Wan (<email address hidden>) on branch: master
Review: https://review.openstack.org/479118

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.