certificates problem causes snappy to traceback when accessing store

Bug #1464021 reported by Jeff Lane on 2015-06-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Undecided
Unassigned

Bug Description

Not sure where to put these right now, so putting them here. The following things were discovered while doing the Using Snappy walkthrough found here: https://developer.ubuntu.com/en/snappy/tutorials/using-snappy/

1: snappy list -v
this doesn't work, it results in an error:

ubuntu@localhost:~$ snappy list -v
Usage:snappy [-h] [-v]
             {info,versions,search,update-versions,update,rollback,install,uninstall,tags,config,build,booted,chroot,framework,fake-version,nap}
             ...
snappy: error: invalid choice: 'list' (choose from 'info', 'versions', 'search', 'update-versions', 'update', 'rollback', 'install', 'uninstall', 'tags', 'config', 'build', 'booted', 'chroot', 'framework', 'fake-version', 'nap')

2: snappy versions (tried this because list didn't work and I wanted to see what it did) Right out of the box, I get a traceback.
ubuntu@localhost:~$ snappy versions
Traceback (most recent call last):
  File "/usr/bin/snappy", line 25, in <module>
    status = Main().__main__()
  File "/usr/lib/python3/dist-packages/snappy/main.py", line 195, in __main__
    return callback(args)
  File "/usr/lib/python3/dist-packages/snappy/main.py", line 334, in _do_versions
    click_versions = ClickDataSource().versions(all)
  File "/usr/lib/python3/dist-packages/snappy/click.py", line 189, in versions
    all_updates_list = repo.get_upgradable()
  File "/usr/lib/python3/dist-packages/click/repository.py", line 183, in get_upgradable
    headers={"content-type": "application/json"})
  File "/usr/lib/python3/dist-packages/click/network.py", line 70, in http_request
    curl.perform()
pycurl.error: (60, 'server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none')

Jeff Lane (bladernr) wrote :

I also noted that if there is no DNS server listed in named.conf (I've modified mine to use a static address rather than DHCP, and forgot initially to define nameservers) 'snappy versions" returns another ugly traceback about not being able to resolve names... both of those tracebacks should be handled better.

ubuntu@localhost:~$ snappy versions
Traceback (most recent call last):
  File "/usr/bin/snappy", line 25, in <module>
    status = Main().__main__()
  File "/usr/lib/python3/dist-packages/snappy/main.py", line 195, in __main__
    return callback(args)
  File "/usr/lib/python3/dist-packages/snappy/main.py", line 334, in _do_versions
    click_versions = ClickDataSource().versions(all)
  File "/usr/lib/python3/dist-packages/snappy/click.py", line 189, in versions
    all_updates_list = repo.get_upgradable()
  File "/usr/lib/python3/dist-packages/click/repository.py", line 183, in get_upgradable
    headers={"content-type": "application/json"})
  File "/usr/lib/python3/dist-packages/click/network.py", line 70, in http_request
    curl.perform()
pycurl.error: (6, 'Could not resolve host: myapps.developer.ubuntu.com')

Jeff Lane (bladernr) wrote :

The certificate thing seems to break anything that wants to visit the store:
ubuntu@localhost:~$ snappy search docker
Traceback (most recent call last):
  File "/usr/bin/snappy", line 25, in <module>
    status = Main().__main__()
  File "/usr/lib/python3/dist-packages/snappy/main.py", line 195, in __main__
    return callback(args)
  File "/usr/lib/python3/dist-packages/snappy/main.py", line 401, in _do_search
    results = ClickDataSource().search(args.args)
  File "/usr/lib/python3/dist-packages/snappy/click.py", line 100, in search
    results = repo.search(",".join(terms))
  File "/usr/lib/python3/dist-packages/click/repository.py", line 141, in search
    resp, raw_content = http_request(url, headers=get_store_headers())
  File "/usr/lib/python3/dist-packages/click/network.py", line 70, in http_request
    curl.perform()
pycurl.error: (60, 'server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none')

ubuntu@localhost:~$ snappy install docker
Traceback (most recent call last):
  File "/usr/bin/snappy", line 25, in <module>
    status = Main().__main__()
  File "/usr/lib/python3/dist-packages/snappy/main.py", line 195, in __main__
    return callback(args)
  File "/usr/lib/python3/dist-packages/snappy/main.py", line 450, in _do_install
    manifest = ClickDataSource().details(package)
  File "/usr/lib/python3/dist-packages/snappy/click.py", line 91, in details
    manifest = repo.details(part)
  File "/usr/lib/python3/dist-packages/click/repository.py", line 154, in details
    self.DETAILS_URI % url_quote(name), headers=get_store_headers())
  File "/usr/lib/python3/dist-packages/click/repository.py", line 123, in _http_request
    return http_request(uri, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/network.py", line 70, in http_request
    curl.perform()
pycurl.error: (60, 'server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none')

summary: - issues using different parts of the snappy command
+ certificates problem causes snappy to traceback when accessing store
Jeff Lane (bladernr) wrote :

summary modified, the certificates thing is more important than the missing list command.

Michael Vogt (mvo) wrote :

Thanks for your bugreport.

This looks like you are using a older image. Could you please ensure that you use one of the 15.04.1 image based on the instruction from https://developer.ubuntu.com/en/snappy/start/ and see if that fixes the issue? That image should both have the list comamnd and the SSL error fixed.

Changed in snappy:
status: New → Incomplete
Jeff Lane (bladernr) wrote :

Yep, Ogra provided me with a better image than the one the Pi shipped with and the certificates issue has been resolved.

Changed in snappy:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers