Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insufficient Permissions Access to customer is not allowed #194

Open
ghamed opened this issue Dec 2, 2014 · 7 comments
Open

Insufficient Permissions Access to customer is not allowed #194

ghamed opened this issue Dec 2, 2014 · 7 comments

Comments

@ghamed
Copy link

ghamed commented Dec 2, 2014

Hi,

I have 2 groups (Linux/Windows). When i try to change the Agents Group from linux to windows it keep saying

Insufficient Permissions
Access to customer is not allowed

And this is from rvapifile

2014-12-02 09:44:53 - rvapi - ERROR - Uable to save user: User(name=u'admin', fullname=u'ADMIN', email=u'*****')
2014-12-02 09:44:53 - rvapi - ERROR - RqlCompileError: Unrecognized optional argument `upsert`. in:
r.table('users').insert(r.expr({'current_customer': u'Windows Agents', 'enabled': True, 'full_name': u'ADMIN', 'default_customer': u'default', 'password': u'$2a$12$TdnsbKjAOeK2so2NbZbvaurugvsZJjcph0yfGy0FVxXtoDf0NXrNC', 'user_name': u'admin', 'email': u'****'}), upsert=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/vFense/server/hierarchy/manager.py", line 1497, in save_user
    return actions.save_user(_user)
  File "/usr/local/lib/python2.7/dist-packages/vFense/server/hierarchy/_db/actions.py", line 540, in save_user
    collection_name=Collection.Users
  File "/usr/local/lib/python2.7/dist-packages/vFense/db/client.py", line 66, in db_wrapper
    output = fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/vFense/server/hierarchy/_db/actions.py", line 383, in _db_save
    .run(conn)
  File "/usr/local/lib/python2.7/dist-packages/rethinkdb/ast.py", line 75, in run
    return c._start(self, **global_optargs)
  File "/usr/local/lib/python2.7/dist-packages/rethinkdb/net.py", line 212, in _start
    return self._send_query(query, global_optargs)
  File "/usr/local/lib/python2.7/dist-packages/rethinkdb/net.py", line 313, in _send_query
    self._check_error_response(response, query.term)
  File "/usr/local/lib/python2.7/dist-packages/rethinkdb/net.py", line 290, in _check_error_response
    raise RqlCompileError(message, term, frames)
RqlCompileError: RqlCompileError: Unrecognized optional argument `upsert`. in:
r.table('users').insert(r.expr({'current_customer': u'Windows Agents', 'enabled': True, 'full_name': u'CTG ADMIN', 'default_customer': u'default', 'password': u'$2a$12$TdnsbKjAOeK2so2NbZbvaurugvsZJjcph0yfGy0FVxXtoDf0NXrNC', 'user_name': u'admin', 'email': u'****'}), upsert=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ghamed
Copy link
Author

ghamed commented Dec 2, 2014

Just to comfirm this also happens when creating a new customer. What have changed in my environment was i did a system update whcih updated a lot things (like python/rethinkdb,etc...), Also came across this link and think it might be related
JoshAshby/pyRethinkORM#8

tp/src/tunnels/_db.py contains the upsert
root@vfense01:# rethinkdb -v
rethinkdb 1.15.2
0precise (GCC 4.6.3)
root@vfense01:~# pip freeze | grep rethinkdb
rethinkdb==1.13.0-0
Also this url. https://groups.google.com/forum/#!topic/vfense/kn30vKe6LJI

@ghamed
Copy link
Author

ghamed commented Dec 2, 2014

Ok i have downgraded the rethinkdb to rethinkdb 1.13.4-0ubuntu1~precise (GCC 4.6.3). now i can't start the DB because

Data version not recognized. Is the data directory from a newer version of RethinkDB? (version on disk: 3) 

does anyone know how to fix this?

@linuxdynasty
Copy link

What version of rethinkdb you are running?

On Tue, Dec 2, 2014 at 5:00 AM, megvt08 notifications@github.com wrote:

Just to comfirm this also happens when creating a new customer. What have
changed in my environment was i did a system update whcih updated a lot
things (like python/rethinkdb,etc...), Also came across this link and think
it might be related
JoshAshby/pyRethinkORM#8
JoshAshby/pyRethinkORM#8

tp/src/tunnels/_db.py contains the upsert


Reply to this email directly or view it on GitHub
#194 (comment).

@ghamed
Copy link
Author

ghamed commented Dec 2, 2014

rethinkdb 1.15.2~0precise (GCC 4.6.3)

@ghamed
Copy link
Author

ghamed commented Dec 2, 2014

Ok I was able to fix the issue, process is

  1. dump the DB while you are on latest version (1.15)
    1.1 service vFense stop
    1.2 cd /root && rethinkdb dump (take a note of the dumpfile in my case it was rethinkdb_dump_2014-12-02T11:22:19.tar.gz)
    1.3 service rethinkdb stop
    1.3 mv /var/lib/rethinkdb/vFense/data /var/lib/rethinkdb/vFense/data.old (backing up old data)
  2. apt-get install rethinkdb=1.13.4-0ubuntu1~precise (DownGrade)
  3. cd /root
  4. rethinkdb restorer rethinkdb_dump_2014-12-02T11:22:19.tar.gz (filename from above)

This fixed my issue. well at least it looks ok :)
However it would be nice to implement perhaps the changes for latest rethinkdb. i know it is a lot of change 👍

@linuxdynasty
Copy link

Actually the code supports the latest rethinkdb, if you do a pull it will work. (WARNING, you will have to dump the db and perform the migration process in rethinkdb)

@ghamed
Copy link
Author

ghamed commented Dec 2, 2014

Ok my only problem is i used (git clone https://github.com/toppatch/vFense -b current /opt/TopPatch) so i suppose i need to redownload the code again :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants