(Migrated) how to start Zato in maintenance mode

(This message has been automatically imported from the retired mailing list)

Hello,

I’s like to do some maintenance in services, channels and schedulers, and
specially because most of them are related to WebSphere MQ I’d like to
start Zato
with disabled channels, services and scheduler.
Is it possible? Or, is there any way to accomplish this?

[]s!
Guilherme

Hello Dariusz,

I know about this, but right now my server is down and I don’t want to
start it with everything enabled, otherwise it will consume MQ messages
that I don’t want to…

[]s,
Guilherme

On Mon, May 18, 2015 at 5:16 PM, Dariusz Suchojad dsuch@zato.io wrote:

On 18/05/15 21:57, Guilherme Monteiro wrote:

I’s like to do some maintenance in services, channels and schedulers, and
specially because most of them are related to WebSphere MQ I’d like to
start Zato
with disabled channels, services and scheduler.
Is it possible? Or, is there any way to accomplish this?

Hi Guilherme,

almost all Zato objects can be made inactive.

For instance, here in scheduler jobs …

https://zato.io/docs/web-admin/scheduler/main.html

… there is the ‘Active’ boolean flag. Unticking it will make the
scheduler ignore a given job.

Same goes for HTTP channels and other objects.

On 18/05/15 21:57, Guilherme Monteiro wrote:

I’s like to do some maintenance in services, channels and schedulers, and
specially because most of them are related to WebSphere MQ I’d like to
start Zato
with disabled channels, services and scheduler.
Is it possible? Or, is there any way to accomplish this?

Hi Guilherme,

almost all Zato objects can be made inactive.

For instance, here in scheduler jobs …

https://zato.io/docs/web-admin/scheduler/main.html

… there is the ‘Active’ boolean flag. Unticking it will make the
scheduler ignore a given job.

Same goes for HTTP channels and other objects.

On 18/05/15 22:25, Guilherme Monteiro wrote:

I know about this, but right now my server is down and I don’t want to
start it with everything enabled, otherwise it will consume MQ messages
that I don’t want to…

If it’s emergency you can always look up and update the is_active
columns in SQL directly before starting servers.

For instance:

$ sqlite3 zato.db

SQLite version 3.8.2 2013-12-06 14:53:30
Enter “.help” for instructions
Enter SQL statements terminated with a “;”

sqlite> select id, name, is_active from http_soap order by name;

507|admin.invoke.json|1
75|zato.channel.amqp.create|1
76|zato.channel.amqp.create.json|1
354|zato.channel.amqp.delete|1
355|zato.channel.amqp.delete.json|1
514|zato.channel.amqp.edit|1
515|zato.channel.amqp.edit.json|1

The model is here:

https://github.com/zatosource/zato/blob/master/code/zato-common/src/zato/common/odb/model.py

It’s not documented on https://zato.io/docs/ hence it’s subject to
change without notice but if you’re really, really pressed, this is the
way to do it.

Hello Dariusz,

I had not played with the database before and I am glad how clear it is.

I use PostgreSQL and that is how I disabled the WebSphere MQ channels:

  1. login into PostgreSQL: psql -h -p 5432 -d -U
    -W

  2. Disable WMQ channels:
    update channel_wmq set is_active=false where is_active=true;

To check WMQ channel status:
select id,name,is_active from channel_wmq;

Later I have Zato started, did what I had do and activated the channels. :slight_smile:

Thanks and Best Regards,
Guilherme

On Tue, May 19, 2015 at 1:23 AM, Dariusz Suchojad dsuch@zato.io wrote:

On 18/05/15 22:25, Guilherme Monteiro wrote:

I know about this, but right now my server is down and I don’t want to
start it with everything enabled, otherwise it will consume MQ messages
that I don’t want to…

If it’s emergency you can always look up and update the is_active
columns in SQL directly before starting servers.

For instance:

$ sqlite3 zato.db

SQLite version 3.8.2 2013-12-06 14:53:30
Enter “.help” for instructions
Enter SQL statements terminated with a “;”

sqlite> select id, name, is_active from http_soap order by name;

507|admin.invoke.json|1
75|zato.channel.amqp.create|1
76|zato.channel.amqp.create.json|1
354|zato.channel.amqp.delete|1
355|zato.channel.amqp.delete.json|1
514|zato.channel.amqp.edit|1
515|zato.channel.amqp.edit.json|1

The model is here:

https://github.com/zatosource/zato/blob/master/code/zato-common/src/zato/common/odb/model.py

It’s not documented on https://zato.io/docs/ hence it’s subject to
change without notice but if you’re really, really pressed, this is the
way to do it.

On 19/05/15 16:03, Guilherme Monteiro wrote:

Later I have Zato started, did what I had do and activated the channels. :slight_smile:

Thanks Guilherme - it sounds like a really useful idea to be able to
enable/disable objects when servers are down and I’m sure we’ll get to
it and implement it at one point!