Can't activate stable: Local variable 'appliance' referenced before assignment

My rockstor is now on an undetermined version. I was on 3.9.2-48, needed a new feature, so switched to from stable to testing. Now version shown in webui has downgraded to 3.9.2-1, I don’t know how to force an update to occur, nor can I revert to stable due to the error below when I type my Activation Code and press Activate:

Error Traceback provided on the Web-UI

Traceback (most recent call last): File "/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py", line 41, in _handle_exception yield File "/opt/rockstor/src/rockstor/storageadmin/views/update_subscription.py", line 89, in post stableo = self._toggle_repos(password=password) File "/opt/rockstor/src/rockstor/storageadmin/views/update_subscription.py", line 67, in _toggle_repos 'message').format(ono.password, appliance.uuid) UnboundLocalError: local variable 'appliance' referenced before assignment

@grizzly Hello again. Continuing here from your initial GitHub issue relating to your submitted Rock-on and it’s Rockstor version requirement.

The updates you require are currently only available in the Stable channel. See our:

http://rockstor.com/docs/update-channels/update_channels.html

If you had previously selected the testing channel from our now dated ISO then you would need to execute a one-off:

yum update

This was down to a bug in the now legacy CentOS based testing channel.

This should address your:

Must I wait for the next scheduled update event to occur?
comment in the GitHub issue.

See: To all Stable Channel subscribers

So what you need is the Stable channel and to pick up the latest in that channel.

yum info rockstor

will should always tell you the actual version.

So if you could post that we can see where you are actually at currently.

If you look to the final pull request prior to our publishing the Rock-on you originally submitted you will see the “Note:” re the Rockstor version requirement in picture form.

“add postgres-10.6.json to root.json & normalise with 9.5 variant. Fixes #221#222

https://github.com/rockstor/rockon-registry/pull/222

If that was not showing in your version then maybe your local development version was taking preciseness. I.e. you have an earlier version than you actually submitted as that text was in the version of the Rock-on that was eventually merged initiallly.

So lets see what that yum command outputs and we can take it from there. My suspicion is that you have a really early version some how as the latest testing channel on the CentOS side was 3.9.1-16 and the latest stable on CentOS side is now 3.9.2-56 so 3.9.2-1 is pretty odd.

Our Web-UI text relating to the channel status is currently misleading but has been much improved in versions on from what you had installed previously, 3.9.2-48. If in fact you were running that version given the first forum link above’s info on the bug in moving from the now legacy CentOS based testing to a stable. All a bit higgledy-piggledy currently given we have over a 2 year old ISO. But that situation is due to change shortly hopefully.

So lets see the output of those 2 commands.

[root@nas03 log]# yum info rockstor
Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile
 * base: anorien.csc.warwick.ac.uk
 * epel: mirror.hostnet.nl
 * extras: centos.mirrors.nublue.co.uk
 * updates: mirror.ox.ac.uk
Installed Packages
Name        : rockstor
Arch        : x86_64
Version     : 3.9.2
Release     : 1
Size        : 85 M
Repo        : installed
From repo   : Rockstor-Stable
Summary     : RockStor -- Store Smartly
License     : GPL
Description : RockStor -- Store Smartly

I already did a yum update. Trying to run it again shows “No packages marked for update”

@grizzly Could you pop in for the record your “yum info rockstor” version again. I believe it was 3.9.2-1.
If so I think your install is akin to a fresh iso install. And I haven’t seen your particular error report so it’s a bit of a misty what happened here.

Are you still experiencing the error with the inability to select an update channel?

EDIT:
Also make sure to refresh your browser, it may be holding onto your prior Rockstor’s version web browser side code.

Done, not sure what happened there.

1 Like

Yes immediately when pressing the Activate button. Webui also shows Linux: 4.12.4-1.el7.elrepo.x86_64.

I’d disabled btrfs quotas because it seemed to solve a high CPU utililisation problem. But when I browse to some pages, including the updates page, I get errors such as:

[root@nas log]# tail -f rockstor.log
    return func(*args, **kwargs)
  File "/opt/rockstor/src/rockstor/storageadmin/views/command.py", line 318, in post
    import_shares(p, request)
  File "/opt/rockstor/src/rockstor/storageadmin/views/share_helpers.py", line 94, in import_shares
    volume_usage(pool, share.qgroup, share.pqgroup)
  File "/opt/rockstor/src/rockstor/fs/btrfs.py", line 835, in volume_usage
    out, err, rc = run_command(cmd, log=True)
  File "/opt/rockstor/src/rockstor/system/osi.py", line 121, in run_command
    raise CommandException(cmd, out, err, rc)
CommandException: Error running a command. cmd = /sbin/btrfs qgroup show /mnt2/rockstor_rockstor/home. rc = 1. stdout = ['']. stderr = ["ERROR: can't list qgroups: quotas not enabled", '']

in rockstor.log. So I’ve temporarily re-enabled quotas, but same error occurs when hitting Activate.

@grizzly OK thanks.

I’ve just started a Private messge with you to address this breakage that I suspected is as a resulting of the inadvertent downgrade some how.

This will help with avoiding exposing your Appliance ID and activation code openly on the forum.

Lets get that bit done in the PM and bring the rest back here there after.

Hope that helps.