2014-04-28 07:58:33 |
Raphaël Badin |
bug |
|
|
added bug |
2014-04-28 07:59:34 |
Raphaël Badin |
description |
When using the API client to delete a resource, the resource is deleted all right but the client blocks forever.
= How to reproduce =
Assuming you've got a MAAS server installed on localhost:
# Create admin user.
sudo maas-region-admin createadmin --username admin --password test --email test@me.com
# Set up maas cli.
sudo maas login maas http://localhost/MAAS/api/1.0/ `sudo maas-region-admin apikey --username admin`
# Create a zone object.
sudo maas maas zones create name=test_zone
# Get the api key for the admin user.
sudo maas-region-admin apikey --username admin
<grab the API key>
# Now, in a python shell:
python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from apiclient.creds import convert_string_to_tuple
>>> from apiclient.maas_client import (
... MAASClient,
... MAASDispatcher,
... MAASOAuth,
... urllib2,
... )
>>> credentials = convert_string_to_tuple('<Replace with the API key>')
>>> auth = MAASOAuth(*credentials)
>>> client = MAASClient(auth, MAASDispatcher(), "http://localhost/MAAS")
>>> zone_uri = u'/api/1.0/zones/test_zone/'
>>> client.delete(zone_uri)
<blocked forever>
= Notes =
Note that, if you CTL-C the last command (the deletion of the zone), `sudo maas maas zones read` will show that the zone has effectively be deleted.
= Workaround =
A (pretty ugly) workaround is to set a timeout to `urlopen` used by the API client.
>>> from functools import partial
>>> urlopen_with_timeout = partial(urllib2.urlopen, timeout=4)
>>> from apiclient import maas_client
>>> maas_client.urllib2.urlopen = urlopen_with_timeout |
When using the API client to delete a resource, the resource is deleted all right but the client blocks forever.
= How to reproduce =
Assuming you've got a MAAS server installed on localhost:
# Create admin user.
sudo maas-region-admin createadmin --username admin --password test --email test@me.com
# Set up maas cli.
sudo maas login maas http://localhost/MAAS/api/1.0/ `sudo maas-region-admin apikey --username admin`
# Create a zone object.
sudo maas maas zones create name=test_zone
# Get the api key for the admin user.
sudo maas-region-admin apikey --username admin
<grab the API key>
# Now, in a python shell:
python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from apiclient.creds import convert_string_to_tuple
>>> from apiclient.maas_client import (
... MAASClient,
... MAASDispatcher,
... MAASOAuth,
... urllib2,
... )
>>> credentials = convert_string_to_tuple('<Replace with the API key>')
>>> auth = MAASOAuth(*credentials)
>>> client = MAASClient(auth, MAASDispatcher(), "http://localhost/MAAS")
>>> zone_uri = u'/api/1.0/zones/test_zone/'
>>> client.delete(zone_uri)
<blocked forever>
= Notes =
- The same happens when deleting a node so I suspect this is a general problem with the `delete()` method.
- If you CTL-C the last command (the deletion of the zone), `sudo maas maas zones read` will show that the zone has effectively be deleted.
= Workaround =
A (pretty ugly) workaround is to set a timeout to `urlopen` used by the API client.
>>> from functools import partial
>>> urlopen_with_timeout = partial(urllib2.urlopen, timeout=4)
>>> from apiclient import maas_client
>>> maas_client.urllib2.urlopen = urlopen_with_timeout |
|
2014-04-28 10:06:53 |
Raphaël Badin |
maas: importance |
Undecided |
Critical |
|
2014-04-28 10:06:56 |
Raphaël Badin |
maas: status |
New |
Triaged |
|
2014-04-28 20:31:18 |
Launchpad Janitor |
branch linked |
|
lp:~jtv/maas/bug-1313556 |
|
2014-04-28 20:33:06 |
Jeroen T. Vermeulen |
maas: assignee |
|
Jeroen T. Vermeulen (jtv) |
|
2014-04-28 20:33:08 |
Jeroen T. Vermeulen |
maas: status |
Triaged |
In Progress |
|
2014-04-29 06:36:11 |
MAAS Lander |
maas: status |
In Progress |
Fix Committed |
|
2014-04-29 06:54:29 |
Julian Edwards |
nominated for series |
|
maas/1.5 |
|
2014-04-29 06:54:29 |
Julian Edwards |
bug task added |
|
maas/1.5 |
|
2014-04-29 06:58:18 |
Launchpad Janitor |
branch linked |
|
lp:~jtv/maas/1.5-bug-1313556 |
|
2014-04-29 13:57:27 |
Jeroen T. Vermeulen |
maas/1.5: assignee |
|
Jeroen T. Vermeulen (jtv) |
|
2014-04-29 13:57:30 |
Jeroen T. Vermeulen |
maas/1.5: importance |
Undecided |
Critical |
|
2014-04-29 13:57:32 |
Jeroen T. Vermeulen |
maas/1.5: status |
New |
In Progress |
|
2014-04-30 03:11:34 |
Julian Edwards |
maas: milestone |
|
14.10 |
|
2014-04-30 18:20:06 |
MAAS Lander |
maas/1.5: status |
In Progress |
Fix Committed |
|
2014-05-08 06:20:32 |
Julian Edwards |
maas: milestone |
14.10 |
|
|
2014-05-08 06:20:35 |
Julian Edwards |
maas/1.5: milestone |
|
1.5.1 |
|
2014-05-08 17:08:09 |
Launchpad Janitor |
branch linked |
|
lp:~ubuntu-branches/ubuntu/utopic/maas/utopic-proposed |
|
2014-05-08 17:34:37 |
Andres Rodriguez |
description |
When using the API client to delete a resource, the resource is deleted all right but the client blocks forever.
= How to reproduce =
Assuming you've got a MAAS server installed on localhost:
# Create admin user.
sudo maas-region-admin createadmin --username admin --password test --email test@me.com
# Set up maas cli.
sudo maas login maas http://localhost/MAAS/api/1.0/ `sudo maas-region-admin apikey --username admin`
# Create a zone object.
sudo maas maas zones create name=test_zone
# Get the api key for the admin user.
sudo maas-region-admin apikey --username admin
<grab the API key>
# Now, in a python shell:
python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from apiclient.creds import convert_string_to_tuple
>>> from apiclient.maas_client import (
... MAASClient,
... MAASDispatcher,
... MAASOAuth,
... urllib2,
... )
>>> credentials = convert_string_to_tuple('<Replace with the API key>')
>>> auth = MAASOAuth(*credentials)
>>> client = MAASClient(auth, MAASDispatcher(), "http://localhost/MAAS")
>>> zone_uri = u'/api/1.0/zones/test_zone/'
>>> client.delete(zone_uri)
<blocked forever>
= Notes =
- The same happens when deleting a node so I suspect this is a general problem with the `delete()` method.
- If you CTL-C the last command (the deletion of the zone), `sudo maas maas zones read` will show that the zone has effectively be deleted.
= Workaround =
A (pretty ugly) workaround is to set a timeout to `urlopen` used by the API client.
>>> from functools import partial
>>> urlopen_with_timeout = partial(urllib2.urlopen, timeout=4)
>>> from apiclient import maas_client
>>> maas_client.urllib2.urlopen = urlopen_with_timeout |
When using the API client to delete a resource, the resource is deleted all right but the client blocks forever.
[Test Case]
= How to reproduce =
Assuming you've got a MAAS server installed on localhost:
# Create admin user.
sudo maas-region-admin createadmin --username admin --password test --email test@me.com
# Set up maas cli.
sudo maas login maas http://localhost/MAAS/api/1.0/ `sudo maas-region-admin apikey --username admin`
# Create a zone object.
sudo maas maas zones create name=test_zone
# Get the api key for the admin user.
sudo maas-region-admin apikey --username admin
<grab the API key>
# Now, in a python shell:
python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from apiclient.creds import convert_string_to_tuple
>>> from apiclient.maas_client import (
... MAASClient,
... MAASDispatcher,
... MAASOAuth,
... urllib2,
... )
>>> credentials = convert_string_to_tuple('<Replace with the API key>')
>>> auth = MAASOAuth(*credentials)
>>> client = MAASClient(auth, MAASDispatcher(), "http://localhost/MAAS")
>>> zone_uri = u'/api/1.0/zones/test_zone/'
>>> client.delete(zone_uri)
<blocked forever>
= Notes =
- The same happens when deleting a node so I suspect this is a general problem with the `delete()` method.
- If you CTL-C the last command (the deletion of the zone), `sudo maas maas zones read` will show that the zone has effectively be deleted.
= Workaround =
A (pretty ugly) workaround is to set a timeout to `urlopen` used by the API client.
>>> from functools import partial
>>> urlopen_with_timeout = partial(urllib2.urlopen, timeout=4)
>>> from apiclient import maas_client
>>> maas_client.urllib2.urlopen = urlopen_with_timeout |
|
2014-05-09 02:50:23 |
Julian Edwards |
maas/1.5: status |
Fix Committed |
Fix Released |
|
2014-05-09 02:50:25 |
Julian Edwards |
maas: status |
Fix Committed |
Fix Released |
|
2014-05-09 19:48:27 |
Adam Conrad |
bug task added |
|
maas (Ubuntu) |
|
2014-05-09 19:48:39 |
Adam Conrad |
nominated for series |
|
Ubuntu Trusty |
|
2014-05-09 19:48:39 |
Adam Conrad |
bug task added |
|
maas (Ubuntu Trusty) |
|
2014-05-09 19:48:54 |
Adam Conrad |
maas (Ubuntu): status |
New |
Fix Released |
|
2014-05-10 19:46:06 |
Nobuto Murata |
bug |
|
|
added subscriber Nobuto MURATA |
2014-05-11 03:21:44 |
Chris J Arges |
maas (Ubuntu Trusty): status |
New |
Fix Committed |
|
2014-05-11 03:21:46 |
Chris J Arges |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2014-05-11 03:21:49 |
Chris J Arges |
bug |
|
|
added subscriber SRU Verification |
2014-05-11 03:21:57 |
Chris J Arges |
tags |
|
verification-needed |
|
2014-05-11 03:41:39 |
Launchpad Janitor |
branch linked |
|
lp:ubuntu/trusty-proposed/maas |
|
2014-05-21 19:57:02 |
Andres Rodriguez |
tags |
verification-needed |
verification-done |
|
2014-05-21 20:43:08 |
Launchpad Janitor |
maas (Ubuntu Trusty): status |
Fix Committed |
Fix Released |
|
2014-05-21 20:44:04 |
Chris J Arges |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|