AttributeError: 'InstallRequirement' when running update.py

Bug #1440984 reported by Steve Martinelli
86
This bug affects 20 people
Affects Status Importance Assigned to Milestone
OpenStack-Gate
Fix Released
Undecided
Steve Martinelli
tempest
Invalid
Undecided
Unassigned

Bug Description

seems to be affecting many projects in check/gate,

excerpt from the log:
2015-04-07 05:36:51.679 | + cd /opt/stack/new/requirements
2015-04-07 05:36:51.679 | + python update.py /opt/stack/new/keystone
2015-04-07 05:36:51.905 | Traceback (most recent call last):
2015-04-07 05:36:51.905 | File "update.py", line 274, in <module>
2015-04-07 05:36:51.905 | main(options, args)
2015-04-07 05:36:51.905 | File "update.py", line 259, in main
2015-04-07 05:36:51.905 | _copy_requires(options.suffix, options.softupdate, args[0])
2015-04-07 05:36:51.905 | File "update.py", line 219, in _copy_requires
2015-04-07 05:36:51.905 | source_reqs = _parse_reqs('global-requirements.txt')
2015-04-07 05:36:51.905 | File "update.py", line 140, in _parse_reqs
2015-04-07 05:36:51.905 | reqs[_parse_pip(pip)] = pip
2015-04-07 05:36:51.905 | File "update.py", line 101, in _parse_pip
2015-04-07 05:36:51.905 | elif install_require.url:
2015-04-07 05:36:51.905 | AttributeError: 'InstallRequirement' object has no attribute 'url'

sample:
http://logs.openstack.org/01/171001/1/check/check-tempest-dsvm-full/03b8feb/logs/devstacklog.txt.gz

logstash:
186 hits in 60 minutes, all resulting in failures
http://logstash.openstack.org/#eyJzZWFyY2giOiJtZXNzYWdlOlwiQXR0cmlidXRlRXJyb3I6ICdJbnN0YWxsUmVxdWlyZW1lbnQnIG9iamVjdCBoYXMgbm8gYXR0cmlidXRlICd1cmwnXCIiLCJmaWVsZHMiOltdLCJvZmZzZXQiOjAsInRpbWVmcmFtZSI6IjM2MDAiLCJncmFwaG1vZGUiOiJjb3VudCIsInRpbWUiOnsidXNlcl9pbnRlcnZhbCI6MH0sInN0YW1wIjoxNDI4Mzg2OTQwOTU2fQ==

Revision history for this message
Steve Martinelli (stevemar) wrote :
Revision history for this message
Steve Martinelli (stevemar) wrote :

looks related to the latest release of pip (https://pypi.python.org/pypi/pip) since it was released around the same time.

Revision history for this message
Adam Harwell (adam-harwell) wrote :
Revision history for this message
DavidLee (blowdriver) wrote :

I am using devstack to install compute node
at neutron install it show up ""AttributeError: 'InstallRequirement' object has no attribute 'url' ""
same error at here

so how do I fix this issue?
can you teach me?

Revision history for this message
Sukhdev Kapur (sukhdev-8) wrote :

I am seeing the exact same issue in Arista CI as well.

DavidLee (blowdriver)
Changed in tempest:
status: New → Incomplete
Revision history for this message
Ashish Kumar Gupta (ashish-kumar-gupta) wrote :

Not able to stack the controller in the latest devstack. Hitting the same issue.

Revision history for this message
Richil Bhalerao (richil-bhalerao) wrote :

I faced same error when installing devstack:

cd /opt/stack/requirements
+ python update.py /opt/stack/keystone
Traceback (most recent call last):
  File "update.py", line 274, in <module>
    main(options, args)
  File "update.py", line 259, in main
    _copy_requires(options.suffix, options.softupdate, args[0])
  File "update.py", line 219, in _copy_requires
    source_reqs = _parse_reqs('global-requirements.txt')
  File "update.py", line 140, in _parse_reqs
    reqs[_parse_pip(pip)] = pip
  File "update.py", line 101, in _parse_pip
    elif install_require.url:
AttributeError: 'InstallRequirement' object has no attribute 'url'

Revision history for this message
DavidLee (blowdriver) wrote :

Anyone know how to use @Adam Harwell (adam-harwell) that github ?

sorry i am new here.

Changed in tempest:
status: Incomplete → New
Revision history for this message
Steve Martinelli (stevemar) wrote :

trying to address this here: https://review.openstack.org/#/c/171060/

Revision history for this message
Adam Harwell (adam-harwell) wrote :

DavidLee, the github link I provided was a root-cause of the issue -- Steve is working on fixing it, so when his CR lands you will need to re-do your devstack setup.

Revision history for this message
DavidLee (blowdriver) wrote :

@Adam Harwell (adam-harwell)
thank u

@Steve Martinelli
thank u , this problem has solved !

Revision history for this message
Big Ben (bigben80) wrote :

@Steve Martinelli
@Adam Harwell

I start to devstack around 20 minutes ago, still see the same problem.

2015-04-07 09:31:34.854 | + python update.py /opt/stack/keystone
2015-04-07 09:31:35.165 | Traceback (most recent call last):
2015-04-07 09:31:35.165 | File "update.py", line 274, in <module>
2015-04-07 09:31:35.165 | main(options, args)
2015-04-07 09:31:35.165 | File "update.py", line 259, in main
2015-04-07 09:31:35.165 | _copy_requires(options.suffix, options.softupdate, args[0])
2015-04-07 09:31:35.165 | File "update.py", line 219, in _copy_requires
2015-04-07 09:31:35.165 | source_reqs = _parse_reqs('global-requirements.txt')
2015-04-07 09:31:35.165 | File "update.py", line 140, in _parse_reqs
2015-04-07 09:31:35.165 | reqs[_parse_pip(pip)] = pip
2015-04-07 09:31:35.165 | File "update.py", line 101, in _parse_pip
2015-04-07 09:31:35.166 | elif install_require.url:
2015-04-07 09:31:35.166 | AttributeError: 'InstallRequirement' object has no attribute 'url'
2015-04-07 09:31:35.181 | + exit_trap
2015-04-07 09:31:35.181 | + local r=1
2015-04-07 09:31:35.181 | ++ jobs -p
2015-04-07 09:31:35.182 | + jobs=
2015-04-07 09:31:35.182 | + [[ -n '' ]]
2015-04-07 09:31:35.182 | + kill_spinner
2015-04-07 09:31:35.182 | + '[' '!' -z '' ']'
2015-04-07 09:31:35.182 | + [[ 1 -ne 0 ]]
2015-04-07 09:31:35.182 | + echo 'Error on exit'
2015-04-07 09:31:35.182 | Error on exit
2015-04-07 09:31:35.183 | + [[ -z /opt/stack/logs ]]
2015-04-07 09:31:35.183 | + /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
2015-04-07 09:31:35.241 | + exit 1

Revision history for this message
Veena (mveenasl) wrote :

Big Ben,

Could you please change "elif install_require.url" to "elif install_require.link" in /opt/stack/requirement/update.py in _parse_pip function and run stack.sh again. This should solve the problem.

Changed in tempest:
assignee: nobody → Veena (mveenasl)
Revision history for this message
thirunaresh (thirunaresh) wrote :

Veena, it works thanks...

Revision history for this message
praveens (praveens-kit) wrote :

same problem i am also getting.?

 + git show --oneline
2015-04-07 10:44:53.516 | 410ade1 Merge "fix the wrong update logic of catalog kvs driver" into stable/juno
2015-04-07 10:44:53.518 | + cd /opt/stack/devstack
2015-04-07 10:44:53.518 | + setup_develop /opt/stack/keystone
2015-04-07 10:44:53.518 | + local project_dir=/opt/stack/keystone
2015-04-07 10:44:53.518 | + setup_package_with_req_sync /opt/stack/keystone -e
2015-04-07 10:44:53.518 | + local project_dir=/opt/stack/keystone
2015-04-07 10:44:53.518 | + local flags=-e
2015-04-07 10:44:53.519 | ++ cd /opt/stack/keystone
2015-04-07 10:44:53.519 | ++ git diff --exit-code
2015-04-07 10:44:54.233 | + local update_requirements=
2015-04-07 10:44:54.233 | + [[ '' != \c\h\a\n\g\e\d ]]
2015-04-07 10:44:54.234 | + cd /opt/stack/requirements
2015-04-07 10:44:54.234 | + python update.py /opt/stack/keystone
2015-04-07 10:44:54.687 | Traceback (most recent call last):
2015-04-07 10:44:54.687 | File "update.py", line 226, in <module>
2015-04-07 10:44:54.687 | main(options, args)
2015-04-07 10:44:54.687 | File "update.py", line 217, in main
2015-04-07 10:44:54.688 | _copy_requires(options.suffix, args[0])
2015-04-07 10:44:54.688 | File "update.py", line 179, in _copy_requires
2015-04-07 10:44:54.688 | source_reqs = _parse_reqs('global-requirements.txt')
2015-04-07 10:44:54.689 | File "update.py", line 118, in _parse_reqs
2015-04-07 10:44:54.689 | reqs[_parse_pip(pip)] = pip
2015-04-07 10:44:54.689 | File "update.py", line 85, in _parse_pip
2015-04-07 10:44:54.690 | elif install_require.url:
2015-04-07 10:44:54.690 | AttributeError: 'InstallRequirement' object has no attribute 'url'
2015-04-07 10:44:54.740 | + exit_trap
2015-04-07 10:44:54.740 | + local r=1
2015-04-07 10:44:54.741 | ++ jobs -p
2015-04-07 10:44:54.759 | + jobs=
2015-04-07 10:44:54.759 | + [[ -n '' ]]
2015-04-07 10:44:54.759 | + kill_spinner
2015-04-07 10:44:54.759 | + '[' '!' -z '' ']'
2015-04-07 10:44:54.759 | + [[ 1 -ne 0 ]]
2015-04-07 10:44:54.759 | + echo 'Error on exit'
2015-04-07 10:44:54.759 | Error on exit
2015-04-07 10:44:54.759 | + [[ -z /opt/stack/logs ]]
2015-04-07 10:44:54.759 | + /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
2015-04-07 10:44:54.873 | df: '/run/user/1000/gvfs': Permission denied
2015-04-07 10:44:54.988 | + exit 1

Revision history for this message
Big Ben (bigben80) wrote :

@Veena

Thank you, that works for me!

Veena (mveenasl)
Changed in tempest:
assignee: Veena (mveenasl) → nobody
Revision history for this message
Matthew Treinish (treinish) wrote :

This bug has nothing to do with tempest, tempest is never even being run in those failures. This is a bug in requirements because of a new pip release.

Changed in tempest:
status: New → Invalid
Revision history for this message
Steve Martinelli (stevemar) wrote :

this can probably be marked as resolved now

Revision history for this message
Ritesh Paiboina (rsritesh) wrote :

With the work around of Veena. It too has worked for me.

Thank you Veena.

But after that tempest failed to me due to unknown reasons.
So I have disabled tempest and running the stack.

Matt Riedemann (mriedem)
Changed in openstack-gate:
status: New → Fix Released
assignee: nobody → Steve Martinelli (stevemar)
Revision history for this message
Walt Boring (walter-boring) wrote :

Any chance we can get this one backported to Kilo and Juno? This prevents Kilo and Juno installs from devstack to fail.

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.