Zend Server on AWS not leaving cluster properly

General discussion forum for the Zend Server

Zend Server on AWS not leaving cluster properly

Postby noisemc on Fri Mar 10, 2017 8:32 am

I am running CloudFormation stack with schedule based autoscaling. New instance is launched at 7am and terminated at 8pm.

Every time instance gets terminated I get an error in GUI "Server status is not up to date. Verify that the Zend Server daemon is running on this server." with that terminated server IP.
I have to remove it manually because if in the future autoscale group launches a new instance with IP that has already been used in the past and terminated, this new instance cannot join the cluster because that IP is there in warning state.

I tried to track it down, even created my own AMI (yum update to 8.5.7) and tried playing with /etc/init.d/zs-unreg
I noticed this script has a lock file created in /var/lock/subsys/zs-unreg and it also has a symlink in /etc/rc.d/rc0.d/K00zs-unreg but it was not registered with chkconfig

I tried to add it with chkconfig by running chkconfig zs-unreg --level 06 on and it told me that zs-unreg was not compatibile with chkconfig so I added a header:
#!/bin/bash
#
# chkconfig: 345 96 06

I was able to register it with chkconfig zs-unreg --level 06 on after adding the header however when terminating the instance it still hasn't left the cluster before termination.

Has anyone been able to fix this?
We're running AMI ID zs8-rhel7-pro-php5.6-140-0fb02024-34a3-4dc1-a978-fc1add00d719-ami-ee320384.3 (ami-73122119)

Thanks
noisemc
 
Posts: 12
Joined: Wed Nov 23, 2011 8:12 pm

Re: Zend Server on AWS not leaving cluster properly

Postby dima_z_zend on Wed Mar 22, 2017 10:28 am

Hi,

This behavior is not the expected one. To help you solve the problem in a best way for you I would suggest you open ticket at support.zend.com

Thanks,
Dima.
Dmitry Zbarski
Cloud Integration Engineer
Zend Technologies, Ltd.
dima_z_zend
 
Posts: 15
Joined: Sun Jul 17, 2011 3:17 pm
Location: Ramat Gan, Israel

Re: Zend Server on AWS not leaving cluster properly

Postby noisemc on Wed Mar 22, 2017 12:40 pm

Thanks Dima,
I opened a ticked and in the meanwhile I am playing with systemd

Code: Select all
[Unit]
Description=ZS Unreg
Before=shutdown.target reboot.target halt.target
Requires=network-online.target network.target

[Service]
KillMode=none
ExecStart=/bin/true
ExecStop=/usr/local/zend/bin/php /root/zs-init/shutdown.php
RemainAfterExit=yes
Type=oneshot

[Install]
WantedBy=multi-user.target


It works with the single instance but stil doesn't work with CloudFormation after I created and used my own AMI based on Zend One
noisemc
 
Posts: 12
Joined: Wed Nov 23, 2011 8:12 pm


Return to Zend Server

Who is online

Users browsing this forum: No registered users and 9 guests