Views in OpenNebula 7.0

Hello,

after upgrading fromm 6.8 to 7.0.1-1, I have lost my views. I have tried to recreate them, copying “user” or “admin” view folder (/etc/one/fireedge/sunstone/views/…) and, then, modifying some yaml files. Also, I have created a new “limited-user” view.
However, users that belongs to some groups and have “admin” privileges in that groups don’t see “groupadmin” and “admin” view, only “user” and “cloud” view.

That user has this configuration (oneuser show)

oneadmin@myserver:~$ oneuser show  foo
USER 3 INFORMATION
ID              : 3
NAME            : foo
GROUP           : users
SECONDARY GROUPS: 0,1,100,102,103,104,114,115,116,117
PASSWORD        : blablabla
AUTH_DRIVER     : core
ENABLED         : Yes

TOKENS

USER TEMPLATE
FIREEDGE=[
  SCHEME="dark",
  SUNSTONE_VIEWS="admin,user,cloud,groupadmin" ]
SUNSTONE=[
  DEFAULT_VIEW="admin",
  SUNSTONE_VIEWS="admin,user,cloud,groupadmin",
  TABLE_DEFAULT_PAGE_LENGTH="100" ]>

My /etc/one/fireedge/sunstone/views/sunstone-server.yaml file is:

groups:
    oneadmin:
        - admin
        - groupadmin
        - user
        - cloud
        - limited-user
default:
    - user
    - cloud

views:
  admin:
    name: Admin view
    description: Admin view
  user:
    name: User view
    description: User view
  cloud:
    name: Cloud view
    description: Cloud view
  groupadmin:
    name: Groupadmin view
    description: Groupadmin view
  limited-user:
    name: Limited-user view
    description: Limited-user view

What am I doing wrong???

Configuration for one of the groups that user belongs is:

And user belogs to some groups, one of them has the view configuration taken in last screenshot.

That user acts as “admin” for some groups and needs “groupadmin” view in other to, for example, undeploy or terminate VMs from other users in the same group.

Thanks.
Help, please!

Hello Daniel,

There appear to be two separate issues.

First, FireEdge does not use:

FIREEDGE=[
  SUNSTONE_VIEWS="admin,user,cloud,groupadmin"
]

The available views are taken from the FIREEDGE section of the user’s primary group. Please check:

onegroup show users

and configure the required views there, for example:

FIREEDGE=[
  DEFAULT_VIEW="user",
  VIEWS="user,cloud,groupadmin",
  GROUP_ADMIN_DEFAULT_VIEW="groupadmin",
  GROUP_ADMIN_VIEWS="groupadmin,user,cloud"
]

Also, renaming files to *.yaml-OLD does not disable them because FireEdge may still read files in the view directory. Move them completely outside:

mkdir -p /etc/one/fireedge/sunstone/disabled

mv /etc/one/fireedge/sunstone/views/cloud/*-OLD \
   /etc/one/fireedge/sunstone/disabled/

systemctl restart opennebula-fireedge

Finally, there is a known FireEdge issue affecting actions inside the groupadmin view:

Some view entries use old underscore-style names such as snapshot_disk_create, while FireEdge expects hyphenated names such as disk-snapshot-create. This can cause buttons to remain hidden even when the view is correctly loaded.