[2.1, rev5670] Can't release machines previously deployed/failed deployment/or newly deployed after upgrade to latest trunk

Bug #1659672 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Gavin Panella

Bug Description

I had the following machines:

a. (1) Deployed
b. (2) Failed deployment
c. (3) Ready

I upgraded to latest trunk rev5670 from a version that didn't use the new 'script' work.

1. After trying to release (a) and (b), I see the issue below (both in UI and traceback).
2. I tried to deploy (3) and then try to release, see the same issue. However, I clicked on 'retry' and it released fine this time.

Steps to reproduce
==================
1. Install MAAS 2.1
2. Deploy machine
3. Upgrade to latest trunk rev5670
4. Release the machine.

==> /var/log/maas/regiond.log <==
2017-01-26 17:19:03 maasserver.websockets.protocol: [critical] Error on request (87) machine.action: {"current_installation_script_set": ["script set instance with id 7 does not exist."]}

Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 824, in worker
    return target()
  File "/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 46, in work
    task()
  File "/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 190, in doWork
    task()
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 246, in inContext
    result = inContext.theWork()
  File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 262, in <lambda>
    inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
  File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 81, in callWithContext
    return func(*args,**kw)
  File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 857, in callInContext
    return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 225, in wrapper
    result = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 685, in call_within_transaction
    return func_outside_txn(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 503, in retrier
    return func(*args, **kwargs)
  File "/usr/lib/python3.5/contextlib.py", line 30, in inner
    return func(*args, **kwds)
  File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/machine.py", line 720, in action
    return action.execute(**extra_params)
  File "/usr/lib/python3/dist-packages/maasserver/node_action.py", line 395, in execute
    secure_erase=secure_erase, quick_erase=quick_erase)
  File "/usr/lib/python3/dist-packages/maasserver/models/node.py", line 2500, in release_or_erase
    self.release(user, comment)
  File "/usr/lib/python3/dist-packages/maasserver/models/node.py", line 2394, in release
    self._release(user)
  File "/usr/lib/python3/dist-packages/maasserver/models/node.py", line 2465, in _release
    self._finalize_release()
  File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 669, in call_within_transaction
    return func_within_txn(*args, **kwargs)
  File "/usr/lib/python3.5/contextlib.py", line 30, in inner
    return func(*args, **kwds)
  File "/usr/lib/python3/dist-packages/maasserver/models/node.py", line 2483, in _finalize_release
    self.save()
  File "/usr/lib/python3/dist-packages/maasserver/models/node.py", line 1522, in save
    super(Node, self).save(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/maasserver/models/cleansave.py", line 28, in save
    self.full_clean()
  File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 1171, in full_clean
    raise ValidationError(errors)
django.core.exceptions.ValidationError: {'current_installation_script_set': ['script set instance with id 7 does not exist.']}

Related branches

Changed in maas:
importance: Undecided → Critical
status: New → Confirmed
assignee: nobody → Lee Trager (ltrager)
description: updated
summary: [2.1, rev5670] Can't release machines previously deployed/failed
- deployment after upgrade to latest trunk
+ deployment/or newly deployed after upgrade to latest trunk
tags: added: oil oil-2.0
tags: added: cdo-qa-blocker
Changed in maas:
status: Confirmed → In Progress
Changed in maas:
status: In Progress → Fix Committed
milestone: none → 2.2.0
assignee: Lee Trager (ltrager) → Gavin Panella (allenap)
Changed in maas:
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.