Error when adding new user

Good day,
I am new user of latest stable Rockstore release, I have a new installation on repurposed old machine and I’ve encountered a problem when adding a new user; I will get an error (uploaded in screenshot for a view, scroll lower)

As far as reproducing problem goes;
Clicking System > Users > Add User > filled up username / password / not allowing the user to log into WebUI / login shell = /sbin/nologin / UID = leaving empty / Group > tried to go with “users” / didn’t filled e-mail.

Web-UI screenshot

Error Traceback provided on the Web-UI (from log)

[09/Oct/2017 21:55:18] ERROR [storageadmin.util:44] exception: save() prohibited to prevent data loss due to unsaved related object 'group'. 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/user.py", line 167, in post suser.save() File "/opt/rockstor/eggs/Django-1.8.16-py2.7.egg/django/db/models/base.py", line 685, in save "unsaved related object '%s'." % field.name ValueError: save() prohibited to prevent data loss due to unsaved related object 'group'.

Any ideas what might be wrong? Thank you for reply!

@Hackrus Welcome to the Rockstor community and good day to yourself.

Sorry for the slow response and thanks for reporting your findings.

Yes: this was a rather unfortunate regression bug that ended up in the last stable release. But the good news is that it has now been fixed in our current testing channel updates as of:

via the following issue:

https://github.com/rockstor/rockstor-core/issues/1780

We are in the process of re-thinking our release strategies / timings etc in an attempt to improve on stable release quality / frequency but that is as yet still ‘in flux’.

As per:

the next stable release is pending but otherwise your options are to switch to the testing channel for your updates, which is expected to break often, apply this specific fix by hand: the essence of it is an additional line as per:

https://github.com/rockstor/rockstor-core/pull/1782/commits/bc6b2f3fc5c07265ad3fcec991b019d23de4001d

followed by a reboot or a rockstor.service restart. I would not advise you attempt this is you are not happy with using the command line in linux and happy to edit python code. But we do include nano which is quite user friendly (use spaces not tabs).

Or await the next stable release.

All of which nicely highlights the reason for re-thinking the release strategy / frequency.

Hope that helps and apologies for not catching this one earlier.

Hello and thank you for reply.

I was wondering if something might be wrong on my side - and it seems like that is not my case. And since I am using Rockstor only for home usage only as network storage builded from old scrap around, then user management is not really something critical for me; I’ll just map shares as online drives as I see fit and then being done with it - my parents have no idea about how to connect to network device, so there is no need to set any kind of restrictions.

I am wondering about one thing though; when the next stable release will be out (with fix), will I be able to remove users, which were created with this error? Didn’t mentioned this in my first post above, but even with faulty error pop-up window, the user were actually created… but I can’t edit him nor delete him. This will be fixed as well?

Thank you for reply!