Page 1 of 1

Migrating users from server A to server B

Published: September 10, 2019 - 4:16 PM
by Aurore
Hello,
We currently have an architecture with two WAPT servers. The first (let's call it A) manages one website, and the second (B) manages several.
We want to migrate the users from server A to server B.

- WAPT version: 1.7.4
- Server OS: Windows
- Administration machine OS: Windows 10

We have tried:
- Manually, by modifying wapt-get.ini. This sometimes worked, but the certificates regularly caused problems.
- Manually installing the new agent (connected to the correct server) over the old one. This worked about half the time.
- Creating a GPO to deploy waptdeploy.exe via script, with the appropriate settings. This works, but requires the workstations to update their Group Policy and then restart.

Is there a method to migrate, for example, 5 workstations at a time? Are the methods we are currently using the correct ones?
Thank you in advance.

Re: Migrating users from server A to server B

Published: September 16, 2019 - 6:29 PM
by sfonteneau
Hello

, could you please clarify your needs?
There are many ways to migrate, for various uses.

You can choose to keep the certificates or not.
It also depends on your current configuration, HTTPS certificate verification, prefix, etc.

Could you please outline the context of your "migration"?

Re: Migrating users from server A to server B

Published: September 17, 2019 - 11:37
by Aurore
Hello, and thank you for your reply.

We want to centralize all our sites on a single server, rather than having them spread across different servers. Currently, we have workstations connecting to several WAPT servers, and we ultimately want them to connect to only one, by "migrating" them from server A (mentioned earlier) to server B, which will then be connected to all the workstations.

Currently, we migrate them via Group Policy Objects (GPO), with a script that runs waptdeploy when the machines start up and shut down. The problem is that we can't track the workstations throughout the building to restart them, since some users don't shut them down. We are therefore looking for another way to migrate the workstations, perhaps by batching them, which would allow us to select groups of workstations to migrate and thus control the transfer to the new server, without waiting for action from our users.

Regarding the certificates, they are replaced during the new installation.

Regarding prefixes, we're also looking into that: since there's a prefix change from one server to another (which isn't always consistent), we were wondering how to link the new packages to the old ones and remove the latter, more easily than manually.

Thanks in advance!

Re: Migrating users from server A to server B

Published: September 17, 2019 - 12:30 PM
by sfonteneau
Aurore wrote: September 17, 2019 - 11:37 AM Hello, and thank you for your reply.

We want to centralize all our sites on a single server, rather than having them spread across different servers. Currently, we have workstations connecting to several WAPT servers. Ultimately, we want them to connect to only one, by "migrating" them from server A (mentioned earlier) to server B, which will then be connected to all the workstations.

Currently, we migrate them via GPO, with a script that runs waptdeploy when the machines start up and shut down. The problem is that we can't track the workstations throughout the building to restart them, since some users don't shut them down. Therefore, we are looking for another way to migrate the workstations, for example, by batching them. This would allow us to select groups of workstations to migrate and thus control the transfer to the new server, without waiting for action from our users.
Absolutely, it's possible; the method is to create a package that generates a scheduled task at hour ° 2 minutes.

That's exactly what the waptupgrade package does:
https://github.com/tranquilit/WAPT/blob ... up.py#L259
Aurore wrote: Sep 17, 2019 - 11:37 AM Regarding the certificates, they are replaced during the new installation.

We are also looking into the prefixes: since there is a prefix change from one server to another (which isn't necessarily consistent), we were wondering how to link the new packages to the old ones and remove the latter, more easily than manually.

Thank you in advance!
A package like this could work to forget the old package and reinstall the new one with the same name:

Code: Select all

def install():
    oldprefix = 'tis-'
    newpefix = 'toto-'
    for p in list(WAPT.list()): 
        if p.package.startswith(oldprefix):
            try:
                WAPT.install(newpefix + p.package.split(oldprefix,1)[1])
            except:
                pass
            WAPT.forget_packages(p.package)

Re: Migrating users from server A to server B

Published: September 17, 2019 - 3:49 PM
by Aurore
I tried migrating the workstations using WaptUpgrade, but we're encountering a problem with some workstations, regardless of the method: the new agent installs correctly, but the client doesn't register with the server. The client can retrieve packages from the repository, but the server doesn't see it. If the client isn't already in the database, it doesn't appear at all.
Even manually installing the agent doesn't solve the problem.

A `wapt-get register` command works, but it doesn't make the workstation appear. I tried by following a runwaptservice, which returns the following errors:
"
WARNING Websocket connect params: Unable to get auth token: Error on server:
EWaptAuthentificationFailure(u'Unknown host UUID [...]. Please register first.',)
"
then:
"
WARNING Host on the server is not known under this FQDN name (Known as None). Trying to register...
CRITICAL Error on the server:
NameError("global name 'EWaptCryptoException' is not defined",)
CRITICAL Unable to update server status: Error on server:
NameError("global name 'EWaptCryptoException' is not defined",)
"
Then the error:
"
WARNING Websocket connect params: Unable to get auth token: Error on server:
EWaptAuthentificationFailure(u'Unknown host UUID [...]. Please register first.',)
"
Repeating over and over again. I've searched the forums but haven't found any solutions, and I'm out of ideas myself.
Thanks in advance