[fuel-bootstrap] Not possible to build image from https repos

Bug #1536523 reported by Dmitry Kalashnik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Fedor Zhadaev
8.0.x
Fix Released
High
Fedor Zhadaev
Mitaka
Fix Released
High
Fedor Zhadaev

Bug Description

Steps to reproduce:
Steps to reproduce:
1. Setup https deb mirror
2. Setup proxy server
3. Install fuel-master
4. Set https proxy in /etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml
5. Add mirror to /etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml
6. Run fuel-bootstrap build

Expected result:
image is built

Actual result:
Unexpected error while running command.
Command: chroot /tmp/tmpPPFNk3.fuel-agent-image apt-get -y update
Exit code: 100
Stdout: ''
Stderr: 'E: The method driver /usr/lib/apt/methods/https could not be found.\n'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 374, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/command.py", line 54, in run
    self.take_action(parsed_args)
  File "/usr/lib/python2.7/site-packages/fuel_bootstrap/commands/build.py", line 164, in take_action
    image_uuid, path = bs_image.make_bootstrap(vars(parsed_args))
  File "/usr/lib/python2.7/site-packages/fuel_bootstrap/utils/bootstrap_image.py", line 185, in make_bootstrap
    mngr.do_mkbootstrap()
  File "/usr/lib/python2.7/site-packages/fuel_agent/manager.py", line 827, in do_mkbootstrap
    attempts=CONF.fetch_packages_attempts)
  File "/usr/lib/python2.7/site-packages/fuel_agent/utils/build.py", line 109, in run_apt_get
    stdout, stderr = utils.execute(*cmds, attempts=attempts)
  File "/usr/lib/python2.7/site-packages/fuel_agent/utils/utils.py", line 133, in execute
    stderr=stderr, cmd=command)
ProcessExecutionError: Unexpected error while running command.

Revision history for this message
Alexander Gordeev (a-gordeev) wrote :

debootstrap doesn't install packages needed for smooth working with https repos later. so apt-get update fails when trying to use https repos.

the issue was intensively disscussed among the team member.

we've decided to fix it at the lowest possible level at utils in `run_debootstrap`:

https://github.com/openstack/fuel-agent/blob/master/fuel_agent/utils/build.py#L61

major concern that prevented us from spreading the fix over all object layers is the fact that debootstrap mainly needed for building ubuntu/debian images. If we want to build images of centos/other rpm based, then we couldn't reuse tricky multiple stage image building as it was done for ubuntu images.

it seems that https packages for apt-get are essential and nobody will argue against that. Therefore it'll be better to install them in the advance.

Changed in fuel:
assignee: Arthur Svechnikov (asvechnikov) → Fedor Zhadaev (fzhadaev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-agent (master)

Reviewed: https://review.openstack.org/270751
Committed: https://git.openstack.org/cgit/openstack/fuel-agent/commit/?id=b4d3324c9de5201051fd0df14988bb5b40a6f3a2
Submitter: Jenkins
Branch: master

commit b4d3324c9de5201051fd0df14988bb5b40a6f3a2
Author: alexz <email address hidden>
Date: Thu Jan 21 13:47:15 2016 +0200

    Upload CA certificates after uploading extra_files

    Give users an ability to upload their CA certificates for accessing
    to repositories via https.

    Closes-Bug: #1536523
    Change-Id: I5479d66da0302c0a4d580dcf1f40c57ad9dd9b40

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-agent (stable/8.0)

Fix proposed to branch: stable/8.0
Review: https://review.openstack.org/273199

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-agent (stable/8.0)

Reviewed: https://review.openstack.org/273199
Committed: https://git.openstack.org/cgit/openstack/fuel-agent/commit/?id=e40bcfbb1f5518d7a464cc330909cf09b84e7c20
Submitter: Jenkins
Branch: stable/8.0

commit e40bcfbb1f5518d7a464cc330909cf09b84e7c20
Author: alexz <email address hidden>
Date: Thu Jan 21 13:47:15 2016 +0200

    Upload CA certificates after uploading extra_files

    Give users an ability to upload their CA certificates for accessing
    to repositories via https.

    Closes-Bug: #1536523
    Change-Id: I5479d66da0302c0a4d580dcf1f40c57ad9dd9b40
    (cherry picked from commit b4d3324c9de5201051fd0df14988bb5b40a6f3a2)

Revision history for this message
Dmitry Kalashnik (dkalashnik) wrote :

Verified on ISO 507

Revision history for this message
Dmitry Kalashnik (dkalashnik) wrote :
Changed in fuel:
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.