stack.sh fails with error in cliff.app

Bug #1322931 reported by Brad Silva
40
This bug affects 9 people
Affects Status Importance Assigned to Milestone
cliff
Fix Released
Undecided
Unassigned
devstack
Invalid
Undecided
Unassigned

Bug Description

Environment: CentOS 6.5, tested both right off DVD and patched to 2014-05-24, same result.
Intel Xeon 3450, 8GB RAM

Installed DevStack via the single-instance instructions and launched stack.sh. After a long time processing, the following error occurs and stack.sh exits:
2014-05-24 08:43:42.437 | ERROR: cliff.app 'module' object has no attribute 'compress'
2014-05-24 08:43:42.464 | + EC2_URL=
2014-05-24 08:43:42.466 | ++ err_trap
2014-05-24 08:43:42.487 | ++ local r=1
2014-05-24 08:43:42.490 | stack.sh failed: full log in /var/log/openstack/stack.sh.log.2014-05-24-083910

Some Googling turned up a similar error in a bug report for RHEL:
https://bugzilla.redhat.com/show_bug.cgi?id=980964

This was related to having too new a version of the Python cliff module, They recommended 1.3 branch rather than 1.6.1. I uninstalled 1.6.1 and installed 1.3.3 and reran stack.sh, but got the same error. Unfortunately, it appears that stack.sh upgraded cliff to 1.6.1.

Any ideas?

Thanks,
Brad

Revision history for this message
Brad Silva (bsilva) wrote :
Revision history for this message
Brad Silva (bsilva) wrote :

Log file.

Revision history for this message
vmThunder (quanyongf) wrote :

Same issues met for the devstack .stack.sh. The OS was CentOS6.5.

Revision history for this message
Xian Feng Tao (taoxf) wrote :

I also found the RHEL bug but it's also happening again on my RHEL6.5 since last week.
And the version is python-cliff-1.4.4-1.el6.noarch

Feodor Tersin (ftersin)
Changed in devstack:
assignee: nobody → Feodor Tersin (ftersin)
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/95500

Changed in devstack:
status: New → In Progress
Revision history for this message
Feodor Tersin (ftersin) wrote :

Since it's broken due to my changes (https://review.openstack.org/#/c/94689/) i've proposed the solution above. It uses traditional parsing of command output rather than to use openstackclient options.

If there is no urgency to fix this issue the better way is not to commit this, but to fix cliff to make it compatible with RHEL and CentOS in this case.
It seems that cause of the problem is that cliff/show.py doesn't contain alternative import itertools.compress as it's in cliff/lister.py. I can't check it because i don't have any OS listed above. Could you check this?

Also if you want to use 1.3.3 cliff, you should set CLIFF_BRANCH=1.3.3 in your localrc.

Revision history for this message
Brad Silva (bsilva) wrote :

I had mis-read the RHEL bug and the reference to cliff-1.3 was simply that they hadn't included included cliff as a dependency, so it wasn't installed (1.3 was simply the current version when the bug was written). So, the error in the RHEL bug was that the call to cliff failed because wasn't installed.

The urgency is that it appears that DevStack is currently broken for CentOs users.

I'm not a python programmer, but I checked show.py and it had:
import itertools

I changed it to:
import itertools
import itertools.compress

All that did is cause the following (here's the last few lines of the last stack.sh run)

2014-05-26 08:57:29.373 | + create_keystone_accounts
2014-05-26 08:57:29.374 | ++ openstack project create admin
2014-05-26 08:57:29.375 | ++ grep ' id '
2014-05-26 08:57:29.377 | ++ get_field 2
2014-05-26 08:57:29.378 | ++ read data
2014-05-26 08:57:29.742 | ERROR: openstackclient.shell Exception raised: No modu le named compress
2014-05-26 08:57:29.766 | + ADMIN_TENANT=
2014-05-26 08:57:29.768 | ++ openstack user create admin --project '' --email ad <email address hidden> --password xxxxxxxxxxxxxxxx
2014-05-26 08:57:29.770 | ++ grep ' id '
2014-05-26 08:57:29.771 | ++ get_field 2
2014-05-26 08:57:29.772 | ++ read data
2014-05-26 08:57:30.262 | ERROR: openstackclient.shell Exception raised: No modu le named compress
2014-05-26 08:57:30.286 | + ADMIN_USER=
2014-05-26 08:57:30.287 | ++ openstack role create admin
2014-05-26 08:57:30.288 | ++ grep ' id '
2014-05-26 08:57:30.289 | ++ get_field 2
2014-05-26 08:57:30.291 | ++ read data
2014-05-26 08:57:30.661 | ERROR: openstackclient.shell Exception raised: No modu le named compress
2014-05-26 08:57:30.685 | + ADMIN_ROLE=
2014-05-26 08:57:30.688 | + openstack role add --project --user
2014-05-26 08:57:31.069 | ERROR: openstackclient.shell Exception raised: No modu le named compress
[stack@test1 devstack]$ 2014-05-26 08:57:31.093 | + exit_trap
2014-05-26 08:57:31.100 | + local r=1
2014-05-26 08:57:31.102 | ++ jobs -p
2014-05-26 08:57:31.105 | + jobs=
2014-05-26 08:57:31.107 | + [[ -n '' ]]
2014-05-26 08:57:31.110 | + kill_spinner
2014-05-26 08:57:31.113 | + '[' '!' -z '' ']'
2014-05-26 08:57:31.115 | + exit 1

Brad

Revision history for this message
Brad Silva (bsilva) wrote :

I updated my GIT repo to include your patch and ran it again. This time it ran to completion.

git fetch https://review.openstack.org/openstack-dev/devstack refs/changes/00/95500/1 && git checkout FETCH_HEAD

It took me a moment to figure this out, not much of a git user yet.

Now I just need to add port 80 to the firewall, the script doesn't seem to do that automatically. Should I put in a bug for that, or is that something that the script doesn't do?

Brad

Revision history for this message
Brad Silva (bsilva) wrote :

Got horizon, up, so it appears to be working.

Thanks,
Brad

Revision history for this message
Feodor Tersin (ftersin) wrote :

Sorry for my improvidence. Could you recheck with the attached diff?

To apply diff run below command in cliff root folder:
$ patch -p 1 -i <path_to_downloaded_cliff.diff>

Revision history for this message
Brad Silva (bsilva) wrote : Re: [Bug 1322931] Re: stack.sh fails with error in cliff.app

I think you misunderstood my last update to the ticket.

I applied your patch from GIT and that fixed the problem. I
recommend releasing the patch.

Thanks,
Brad

On Tue, May 27, 2014 at 3:07 AM, Feodor Tersin <email address hidden> wrote:
> Sorry for my improvidence. Could you recheck with the attached diff?
>
> To apply diff run below command in cliff root folder:
> $ patch -p 1 -i <path_to_downloaded_cliff.diff>
>
> ** Patch added: "Make cliff show option compatible with Python 2.6"
> https://bugs.launchpad.net/devstack/+bug/1322931/+attachment/4120499/+files/cliff.diff
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1322931
>
> Title:
> stack.sh fails with error in cliff.app
>
> Status in devstack - openstack dev environments:
> In Progress
>
> Bug description:
> Environment: CentOS 6.5, tested both right off DVD and patched to 2014-05-24, same result.
> Intel Xeon 3450, 8GB RAM
>
> Installed DevStack via the single-instance instructions and launched stack.sh. After a long time processing, the following error occurs and stack.sh exits:
> 2014-05-24 08:43:42.437 | ERROR: cliff.app 'module' object has no attribute 'compress'
> 2014-05-24 08:43:42.464 | + EC2_URL=
> 2014-05-24 08:43:42.466 | ++ err_trap
> 2014-05-24 08:43:42.487 | ++ local r=1
> 2014-05-24 08:43:42.490 | stack.sh failed: full log in /var/log/openstack/stack.sh.log.2014-05-24-083910
>
> Some Googling turned up a similar error in a bug report for RHEL:
> https://bugzilla.redhat.com/show_bug.cgi?id=980964
>
> This was related to having too new a version of the Python cliff
> module, They recommended 1.3 branch rather than 1.6.1. I
> uninstalled 1.6.1 and installed 1.3.3 and reran stack.sh, but got the
> same error. Unfortunately, it appears that stack.sh upgraded cliff
> to 1.6.1.
>
> Any ideas?
>
> Thanks,
> Brad
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/devstack/+bug/1322931/+subscriptions

Revision history for this message
Feodor Tersin (ftersin) wrote :

I've got my DevStack patch fixes the problem. But i still believe the problem is in cliff, and it should be fixed there too. So i asked you to check cliff.diff on current DevStack without my last DevStack patch.
If cliff.diff eliminates the problem, i propose it to cliff repo, and thus we avoid similar problems in the future.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

Please submit the patch to the cliff repo.

Revision history for this message
Feodor Tersin (ftersin) wrote :
Revision history for this message
Brad Silva (bsilva) wrote :

Ahh! It was I that misunderstood.

I'll see if I can figure out who maintains cliff and how to submit patches.

Brad

On Tue, May 27, 2014 at 12:29 PM, Feodor Tersin
<email address hidden> wrote:
> I've got my DevStack patch fixes the problem. But i still believe the problem is in cliff, and it should be fixed there too. So i asked you to check cliff.diff on current DevStack without my last DevStack patch.
> If cliff.diff eliminates the problem, i propose it to cliff repo, and thus we avoid similar problems in the future.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1322931
>
> Title:
> stack.sh fails with error in cliff.app
>
> Status in devstack - openstack dev environments:
> In Progress
>
> Bug description:
> Environment: CentOS 6.5, tested both right off DVD and patched to 2014-05-24, same result.
> Intel Xeon 3450, 8GB RAM
>
> Installed DevStack via the single-instance instructions and launched stack.sh. After a long time processing, the following error occurs and stack.sh exits:
> 2014-05-24 08:43:42.437 | ERROR: cliff.app 'module' object has no attribute 'compress'
> 2014-05-24 08:43:42.464 | + EC2_URL=
> 2014-05-24 08:43:42.466 | ++ err_trap
> 2014-05-24 08:43:42.487 | ++ local r=1
> 2014-05-24 08:43:42.490 | stack.sh failed: full log in /var/log/openstack/stack.sh.log.2014-05-24-083910
>
> Some Googling turned up a similar error in a bug report for RHEL:
> https://bugzilla.redhat.com/show_bug.cgi?id=980964
>
> This was related to having too new a version of the Python cliff
> module, They recommended 1.3 branch rather than 1.6.1. I
> uninstalled 1.6.1 and installed 1.3.3 and reran stack.sh, but got the
> same error. Unfortunately, it appears that stack.sh upgraded cliff
> to 1.6.1.
>
> Any ideas?
>
> Thanks,
> Brad
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/devstack/+bug/1322931/+subscriptions

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

@Brad - cliff is part of the Oslo program now. See Feodor's patch in comment #14.

Revision history for this message
Feodor Tersin (ftersin) wrote :

One more bug can be closed by the proposed fix
https://bugs.launchpad.net/devstack/+bug/1323430

Revision history for this message
Feodor Tersin (ftersin) wrote :

yet one bug can be closed by the proposed fix
https://bugs.launchpad.net/devstack/+bug/1324651

Changed in python-cliff:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cliff (master)

Reviewed: https://review.openstack.org/95916
Committed: https://git.openstack.org/cgit/openstack/cliff/commit/?id=e3bec7be19c8cfa8e8025e84bf0444109dcce730
Submitter: Jenkins
Branch: master

commit e3bec7be19c8cfa8e8025e84bf0444109dcce730
Author: Feodor Tersin <email address hidden>
Date: Wed May 28 01:31:53 2014 +0400

    Make show option compatible with Python 2.6.

    Change-Id: I573ba628e1f7d4e1f6d71223e27f2301db7eb080
    Closes-Bug: #1322931

Changed in python-cliff:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on devstack (master)

Change abandoned by Feodor Tersin (<email address hidden>) on branch: master
Review: https://review.openstack.org/95500

Revision history for this message
Feodor Tersin (ftersin) wrote :

was resolved in Cliff project

Changed in devstack:
assignee: Feodor Tersin (ftersin) → nobody
status: In Progress → Invalid
Changed in python-cliff:
milestone: none → 1.7.0
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.