Re: [Gluster-infra] Opinions on ideal time for gerrit downtime

2016-05-25 Thread Nigel Babu
Thanks Vijay,

I'm leaning towards the morning slot, so it's done before everyone starts
work.

On Thu, May 26, 2016 at 8:20 AM, Vijay Bellur  wrote:

> On 05/25/2016 07:02 AM, Nigel Babu wrote:
>
>> Hello folks,
>>
>> I'd like to bring down gerrit for 2 hours some time next week to migrate
>> our database from H2 to PostgreSQL. This will start us on the path to
>> scaling gerrit better. This migration will also speed up the process of
>> upgrading gerrit to the latest version and having our install running
>> newer releases of gerrit quickly.
>>
>> There is really no good time to bring down an essential service like
>> gerrit. My proposal is Monday 0230[1] UTC or 1230[2] UTC. I've looked at
>> our git punchcards and it's a reasonably quiet time to bring down gerrit
>> for maintenance.
>>
>
> Thank you for taking up this much needed change! Both time slots look good
> to me.
>
>
>> In the meanwhile, I'd appreciate some feedback on review.nigelb.me
>>  which is a snapshot of our gerrit instance
>> from this morning but with the database powered by postgres. I'd
>> appreciate feedback that the permissions work as expected and reviewing
>> works as expected. This instance does not replicate to github, so feel
>> free to push commits to test.
>>
>
> Did not notice anything with my limited testing on this gerrit instance.
> Everything I tried seems to be working as expected.
>
> -Vijay
>
>


-- 
nigelb
___
Gluster-infra mailing list
Gluster-infra@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-infra

Re: [Gluster-infra] Opinions on ideal time for gerrit downtime

2016-05-25 Thread Vijay Bellur

On 05/25/2016 07:02 AM, Nigel Babu wrote:

Hello folks,

I'd like to bring down gerrit for 2 hours some time next week to migrate
our database from H2 to PostgreSQL. This will start us on the path to
scaling gerrit better. This migration will also speed up the process of
upgrading gerrit to the latest version and having our install running
newer releases of gerrit quickly.

There is really no good time to bring down an essential service like
gerrit. My proposal is Monday 0230[1] UTC or 1230[2] UTC. I've looked at
our git punchcards and it's a reasonably quiet time to bring down gerrit
for maintenance.


Thank you for taking up this much needed change! Both time slots look 
good to me.




In the meanwhile, I'd appreciate some feedback on review.nigelb.me
 which is a snapshot of our gerrit instance
from this morning but with the database powered by postgres. I'd
appreciate feedback that the permissions work as expected and reviewing
works as expected. This instance does not replicate to github, so feel
free to push commits to test.


Did not notice anything with my limited testing on this gerrit instance. 
Everything I tried seems to be working as expected.


-Vijay

___
Gluster-infra mailing list
Gluster-infra@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-infra


[Gluster-infra] Opinions on ideal time for gerrit downtime

2016-05-25 Thread Nigel Babu
Hello folks,

I'd like to bring down gerrit for 2 hours some time next week to migrate
our database from H2 to PostgreSQL. This will start us on the path to
scaling gerrit better. This migration will also speed up the process of
upgrading gerrit to the latest version and having our install running newer
releases of gerrit quickly.

There is really no good time to bring down an essential service like
gerrit. My proposal is Monday 0230[1] UTC or 1230[2] UTC. I've looked at
our git punchcards and it's a reasonably quiet time to bring down gerrit
for maintenance.

In the meanwhile, I'd appreciate some feedback on review.nigelb.me which is
a snapshot of our gerrit instance from this morning but with the database
powered by postgres. I'd appreciate feedback that the permissions work as
expected and reviewing works as expected. This instance does not replicate
to github, so feel free to push commits to test.

I do not expect this migration to cause any data loss whatsoever (help in
testing review.nigelb.me appreciated!). I'm taking great pains to make sure
the data is transferred over perfectly. In case we run into any problems
during migration, we can fall back to our H2 database pretty instantly.

During the migration window, gerrit will be completely down. I will send in
an email before the start and after the successful completion of the
migration.

[1]
http://www.timeanddate.com/worldclock/fixedtime.html?msg=Maintenance=20160530T08=176=2
[2]
http://www.timeanddate.com/worldclock/fixedtime.html?msg=Maintenance=20160530T18=176=2

-- 
nigelb
___
Gluster-infra mailing list
Gluster-infra@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-infra

[Gluster-infra] Gerrit migration to PostgreSQL

2016-05-25 Thread Nigel Babu
Hello,

I've attempted a test migration of our gerrit database from H2 to
PostgreSQL.

# How
I copied everything another server, so I wouldn't affect the production
instance in anyway. I converted everything from H2 into csv and then
imported the files into postgres. I ran into a few problems at the postgres
end that are not blockers but will add a bit of time to the conversation.

# Issues
The csv files need to have execution permission on them for all users and
read permissions so that postgresql can open them.

When importing from CSV, postgres does not map column names in the CSV to
column names into the database. It depends on the order instead. For
example, if your table is defined as "id, name, datetime", but the csv has
"datetime, name, id", importing will fail.

In our particular, instance, instead of the following query,

COPY ACCOUNT_GROUPS FROM '/tmp/migrate/ACCOUNT_GROUPS' DELIMITER ',' CSV
HEADER;

We'd need this one, which specifies the order explicitly

COPY ACCOUNT_GROUPS(name, description, visible_to_all, group_uuid,
group_id, owner_group_uuid) FROM '/tmp/migrate/ACCOUNT_GROUPS' DELIMITER
',' CSV HEADER;

# Conclusion
Other than these two issues, the test migration was a smooth process. I
took about 1.5 hours to complete including the time spent with the
unexpected issues. This testing was done on Centos 7, rather than Centos 5.
We now know that migration to Centos 7 will not bring on very large visible
failures. I can't confidently say that everything will work on Centos 5
without testing. I'll be doing another round of testing with Centos 5, to
confirm all will go well there as well.

If you have time to test, please take a look at review.nigelb.me (you may
have to add an /etc/hosts entry pointing to 159.203.88.175). I've turned
off replication, so you can push to this server without side effects
elsewhere.

I'll bring up a Centos 5 server and do a second round of testing. After
that I'll work to schedule a 2-hour maintenance window for gerrit to
complete migration on production.

-- 
nigelb
___
Gluster-infra mailing list
Gluster-infra@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-infra