Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Auth DB config symlink does not persist between ESXi reboots #1347

Closed
msterin opened this issue Jun 5, 2017 · 5 comments
Closed

Auth DB config symlink does not persist between ESXi reboots #1347

msterin opened this issue Jun 5, 2017 · 5 comments

Comments

@msterin
Copy link
Contributor

msterin commented Jun 5, 2017

We put the symlink in /etc/vmware/vmdkops and it seems to be recovered from vib into ramdisk on boot. so we loose the link on reboot

//CC @vxav

In #1032 (comment) @vxav writes:

Question:
I started my 2 nodes lab as a 1 node with local db file.
I later moved auth-db to a shared datastore and created a symlink as the "move" parameter doesn't seem to be supported yet. (Equivalent to a ' config init --datastore "sharedDS"').

However the symlink doesn't seem to persist. so every time the host is restarted auth-db isn't found and _DEFAULT is used.

06/05/17 09:43:10 67487 [Thread-2] [INFO   ] Checking DB mode for /etc/vmware/vmdkops/auth-db...
06/05/17 09:43:10 67487 [Thread-2] [INFO   ] Config DB does not exist. mode NotConfigured
06/05/17 09:43:10 67487 [Thread-2] [INFO   ] Auth DB /etc/vmware/vmdkops/auth-db is missing, allowing all access

I tried the following to restart fresh:

  • config init --local
  • config rm --local --confirm
  • config init --datastore SHARED-Datastore

But the automatically created symlink still doesn't persist after reboot.

A workaround would be to add 'vmdkops_admin config init --datastore "shared-DS"' in the startup script but it doesn't seem like a long term solution.

Any idea on how to make it persistent?

@msterin
Copy link
Contributor Author

msterin commented Jun 5, 2017

//CC @pdhamdhere

  • for shared conf, we need to save the datastore name in /etc/vmware/esx.conf, and restore symlink on service start
  • for local conf, it's worse - we need to save the whole file somewhere and recover it. We can put in in dedicated .tgz and modify bootconf to pick it up , but then the save would have to happen on each modification :-) . It looks like '--local' mode does not add much and we should drop it. We can simply persist DS name where the config DB is in esx.conf

@shaominchen
Copy link
Contributor

Symlink doesn't seem to be mandatory in our design. Can we simply remove it? Just save the path (or just datastore name) in config and re-establish the DB connection during restart - won't it work the same?

@msterin
Copy link
Contributor Author

msterin commented Jun 5, 2017

yes, we can do it but would need to check esx.conf on each VMDK op since they are all independent and open a DB connection on each op. It feels wrong to check esx.conf in DB open.
Another choice (above) is to check esx.conf once on start and simply leave symlink as is

@govint
Copy link
Contributor

govint commented Jun 6, 2017

Is #1032 using a stateless ESX for the test? In which case the behavior is very much expected. Possibly VMDK service startup script will need to restore the DB after figuring out if there are DBs on available datastores?

@vxav
Copy link

vxav commented Jun 6, 2017

No the test ESX is installed on disk.
If it was stateless probably that even the install of the vDVS vib wouldn't persist either if it wasn't in the auto deploy image.

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

No branches or pull requests

5 participants