Nope. The hostnames are all stored in the gerrit.config file. Make
sure that file is correct, and you should be OK.
> Please assume Gerrit is installed on the new Server.
>
> 1) Shut down Gerrit on production Server A
> 2) Dump Server A (existing server) MYSQL database to a backup file
> 3) Copy over backup file to new Server B
> 4) Restore the backup file to Server B
> 5) Rsync GIT repos from production Server A to Server B
> 6) Update the Canonical Web URL on Server with the DNS Alias that
> previously pointed to A
> 7) Start Gerrit on Server B
Yes, as you said in 6, you are updating the canonicalWebURL. I would
also double check the sshd.listenAddress and try to configure it with
the same hostname as the canonicalWebURL as that is the hostname that
Gerrit will advertise to repo upload clients when they try to send a
change for review.
If you use OpenID with providers like Yahoo! or Google Accounts, your
users will lose their account information as a result of changing the
hostname their browser uses to access the site. But if you don't use
OpenID (e.g. you use LDAP or HTTP) then this is a non-issue. Or if you
setup a CNAME from the old host to the new host, and use the CNAME in
the canonicalWebURL you can bypass this.
You may also want to consider copying the ssh host keys from the old
server's $site_path/etc/ directory, so that users don't see the host
key change.
> We recently did a migration from an old server to the a new
> system. The intention was to create a new Gerrit server based on an
> existing Git repo, but since there were change ids in refs/changes,
> we ran into issues. Although that was a different issue, I would like
> to get some feedback on whether I am taking the correct approach.
This occurs because the refs/changes in the Git repository _MUST_
match the database. Above you are ensuring that by shutting down the
system, dumping the database, restoring it, and rsyncing the Git
repositories. But just taking another Gerrit server's refs/changes/
namespace and copying it over causes all sorts of misbehavior and
errors. Fortunately you aren't doing that. :-)
We've used the above process to move servers several times, I think we
have it down to under 20 minutes these days. :-\
Yes, just copy the .ssh/ directory files over. Or generate new keys
and update the replication servers. :-)
> How is this different from the ssh host keys in
> $site_path/etc/? On my server, I see private/public rsa and dsa keys
> in that directory.
The host keys are how the server proves to clients that it is the
server they think it is. Clients use this to remember a server they
have spoken with in the past, if they try to connect to that same
server name again but get a different key, they abort screaming about
how a different party has dropped itself into the middle and might be
eavesdropping on the connection.
The client keys in ~/.ssh/ are how the server proves itself to other
servers its connecting to. Same thing, just the other side of the
connection.
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
>
The site_path in system_config is only used if you launch Gerrit from
a web application container like Tomcat or a self-managed Jetty. If
you launch Gerrit with its gerrit.sh script that runs the built-in
Jetty, site_path comes from where the script lives, not the database.
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.