g-s-s can ignore lockfile and upload two identical images into glance

Bug #1493932 reported by Mike McCracken
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glance-simplestreams-sync (Juju Charms Collection)
Fix Released
Undecided
Mike McCracken

Bug Description

# in a recent install, I saw this:

ubuntu@juju-machine-3-lxc-3:~$ glance image-list
+--------------------------------------+-----------------------------------------------------------------+-------------+------------------+-----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+-----------------------------------------------------------------+-------------+------------------+-----------+--------+
| e7a72008-3031-4b71-9b53-aa07e10cf0cc | auto-sync/ubuntu-trusty-14.04-amd64-server-20150901.1-disk1.img | qcow2 | bare | 258736640 | active |
| fac3e5b5-bfe2-4651-b7a4-8b9ba85241ef | auto-sync/ubuntu-trusty-14.04-amd64-server-20150901.1-disk1.img | qcow2 | bare | 258736640 | active |
+--------------------------------------+-----------------------------------------------------------------+-------------+------------------+-----------+--------+

ubuntu@juju-machine-3-lxc-3:~$ glance image-show e7a72008-3031-4b71-9b53-aa07e10cf0cc
+------------------------------+-----------------------------------------------------------------+
| Property | Value |
+------------------------------+-----------------------------------------------------------------+
| Property 'architecture' | x86_64 |
| Property 'content_id' | auto.sync |
| Property 'item_name' | disk1.img |
| Property 'product_name' | com.ubuntu.cloud:server:14.04:amd64 |
| Property 'source_content_id' | com.ubuntu.cloud:released:download |
| Property 'version_name' | 20150901.1 |
| checksum | 7002ada3e78e3040810a06624a52e52b |
| container_format | bare |
| created_at | 2015-09-09T05:43:12.000000 |
| deleted | False |
| disk_format | qcow2 |
| id | e7a72008-3031-4b71-9b53-aa07e10cf0cc |
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | auto-sync/ubuntu-trusty-14.04-amd64-server-20150901.1-disk1.img |
| owner | da2ae731dbb9463fb3b4535e1c5dfca9 |
| protected | False |
| size | 258736640 |
| status | active |
| updated_at | 2015-09-09T05:43:14.000000 |
+------------------------------+-----------------------------------------------------------------+
ubuntu@juju-machine-3-lxc-3:~$ glance image-show fac3e5b5-bfe2-4651-b7a4-8b9ba85241ef
+------------------------------+-----------------------------------------------------------------+
| Property | Value |
+------------------------------+-----------------------------------------------------------------+
| Property 'architecture' | x86_64 |
| Property 'content_id' | auto.sync |
| Property 'item_name' | disk1.img |
| Property 'product_name' | com.ubuntu.cloud:server:14.04:amd64 |
| Property 'source_content_id' | com.ubuntu.cloud:released:download |
| Property 'version_name' | 20150901.1 |
| checksum | 7002ada3e78e3040810a06624a52e52b |
| container_format | bare |
| created_at | 2015-09-09T05:45:52.000000 |
| deleted | False |
| disk_format | qcow2 |
| id | fac3e5b5-bfe2-4651-b7a4-8b9ba85241ef |
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | auto-sync/ubuntu-trusty-14.04-amd64-server-20150901.1-disk1.img |
| owner | da2ae731dbb9463fb3b4535e1c5dfca9 |
| protected | False |
| size | 258736640 |
| status | active |
| updated_at | 2015-09-09T05:45:54.000000 |
+------------------------------+-----------------------------------------------------------------+

## here's what's going on in the logs

DEBUG * 09-09 05:40:39 [PID:6844] * urllib3.connectionpool * "GET /releases/server/releases/trusty/release-20150901.1/ubuntu-14.04-server-cloudimg-amd64-disk1.img HTTP/1.1" 301 296
DEBUG * 09-09 05:40:39 [PID:6844] * urllib3.connectionpool * Setting read timeout to <object object at 0x7f3221609170>
DEBUG * 09-09 05:40:40 [PID:6844] * urllib3.connectionpool * "GET /releases/trusty/release-20150901.1/ubuntu-14.04-server-cloudimg-amd64-disk1.img HTTP/1.1" 200 258736640
INFO * 09-09 05:41:01 [PID:6857] * root * glance-simplestreams-sync started.
INFO * 09-09 05:41:01 [PID:6857] * root * /var/run/glance-simplestreams-sync.pid is locked, exiting
^^^ this is good behavior

INFO * 09-09 05:42:01 [PID:6864] * root * glance-simplestreams-sync started.
^^^ 6864 should have checked, found it locked, and exited but instead:

DEBUG * 09-09 05:42:01 [PID:6864] * keystoneclient.session * REQ: curl -i -X POST http://172.16.0.50:5000/v2.0/tokens -H "Content-Type: application/json" -H "User-Agent: python-keystoneclient" -d '{"auth": {"passwordCredentials": {"username": "image-stream", "passwo
rd": "5pWcb7tPnPSBkWRHjnZb6YK9CNk6qPtc5yVpBtZHYhcHdbnx34LN3GLc7bK4PFb6"}, "tenantId": "da2ae731dbb9463fb3b4535e1c5dfca9"}}'
INFO * 09-09 05:42:01 [PID:6864] * urllib3.connectionpool * Starting new HTTP connection (1): 172.16.0.50
DEBUG * 09-09 05:42:01 [PID:6864] * urllib3.connectionpool * Setting read timeout to None

Related branches

Mike McCracken (mikemc)
Changed in glance-simplestreams-sync (Juju Charms Collection):
assignee: nobody → Mike McCracken (mikemc)
status: New → In Progress
James Page (james-page)
Changed in glance-simplestreams-sync (Juju Charms Collection):
status: In Progress → 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.