cancel
Showing results for 
Search instead for 
Did you mean: 

OS Patching automation steps - linux servers - without downtime

Level 3 Traveller

OS Patching automation steps - linux servers - without downtime

HI All,

can any one help with the process of automating the patching using ansible.

 

current infrastructure

Linux Vms

primary , standby and witness

Postgres 9.6 EFm 2.1 . 

V10 and EFM 3.1

 

 

 

Login to server with individual user id:

 

 

  1. Stop EFM in all clusters.

 

Pbrun /bin/su – enterrisedb

cd /usr/efm*/bin/./efm stop-cluster efm

 

Login to master, near standby, far standby and witness and make sure efm is stopped.

 

Efm cluster-status efm

 

  1. Stop instance.

 

pg_ctl -D $PGDATA stop

pg_ctl -D $PGDATA status

 

  1. After patching, start the instance.

 

pg_ctl -D $PGDATA start

pg_ctl -D $PGDATA status

 

           Enable PPAS:

pbrun /usr/bin/systemctl enable ppas-9.5.service

 

 

  1. Start EFM agents in all nodes by CISS. Start the EFM in master, standby, witness order.

 

Login as root 

systemctl start efm-2.1

 

  1. Validate efm status from all nodes.

 

Efm cluster-status efm

Tags (1)
1 REPLY 1
Highlighted
EDB Team Member

Re: OS Patching automation steps - linux servers - without downtime

I don't see any need to stop the EFM cluster. You can just do:

 

  1. Stop EFM and anything else on witness. Patch node, start <whatever> again, including EFM witness agent.
  2. Stop EFM on a standby, patch, start everything (including database and EFM).
  3. Repeat for other standby.
  4. Perform a switchover so that the original master is now a standby.
  5. Repeat above patching step on original master that is now a standby.
  6. Perform a switchover so that the original master is the master again (e.g. 'efm set-priority' and then switchover).

That should minimize downtime and keep failover protection in place just in case. In your steps, it looks like you would have downtime while the master is being patched. With the above, you always have a master database running.

 


@Jawaharcool wrote:

[....]

  1. Start EFM agents in all nodes by CISS. Start the EFM in master, standby, witness order.

The order of starting the agents doesn't really matter. Whichever one you start first will do a tiny (negligible) amount of extra work when other nodes come/go, but that's the only difference in the order.

 

Cheers,

Bobby