Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
/usr/local/omk/bin/opha-cli.pl 

Usage: opha-cli.pl act=[action to take] [options...]
opha-cli.pl act=discover url_base=... username=... password=.... role=... mirror=...
opha-cli.pl act=<import_peers|export_peers|list_peers>
opha-cli.pl act=delete_peer {cluster_id=...|server_name=...}
opha-cli.pl act=pull [data_types=X...] [peers=Y] [force=t]
	    pull data types except nodes
	    primary <-- peers
opha-cli.pl act=sync-all-nodes [peers=Y]
	    sync all node data from the primary to the pollers
	    primary --> peers
opha-cli.pl act=sync-processed-nodes
	    sync node data based on changes done by opnodeNMIS9 node_admin.pl
	    primary --> peers
opha-cli.pl act=import_config_data
	    for firsts installation, provide initial data (groups)


opha-cli.pl act=cleanup simulate=f/t
	    clean metadata and files
opha-cli.pl act=clean_orphan_nodes simulate=f/t
	    remove nodes with unknown cluster_id
opha-cli.pl act=resync_nodes peer=server_name
	    remove the nodes from the poller in the primary and pull the nodes from the poller
	    primary <-- peers
opha-cli.pl act=clean_data peer=server_name [all=true]
	    Like resync data but with all the data types
	    primary <-- peers
	    By default, cleanup just pull data
	    all=true includes nodes
opha-cli.pl act=cleanup_poller simulate=f/t
	    from the pollers, clean duplicate configuration items and files
opha-cli.pl act=check_duplicates
	    check for duplicate nodes
opha-cli.pl act=get_status 
opha-cli.pl act=setup-db
opha-cli.pl act=show_roles
opha-cli.pl act=data_verify
opha-cli.pl act=lock_peer {cluster_id=...|server_name=...}
opha-cli.pl act=unlock_peer {cluster_id=...|server_name=...}
opha-cli.pl act=peer_islocked {cluster_id=...|server_name=...}
	    Encryption key
opha-cli.pl act=push_encryption_key 


Info

To get debug information in any command, please run with the following argument:

debug=1..9

E.g. opha-cli.pl act=resync_nodes peer=server_name debug=8

...

Will sync the nodes processed by opnodeNMIS9 node_admin.pl:

Code Block
opha-cli.pl act=sync-processed-nodes

...

Code Block
opha-cli.pl act=lockpeer_peerislocked {cluster_id=...|server_name=...}

We can change the lock status of a peer with:

Code Block

opha-cli.pl act=unlocklock_peer {cluster_id=...|server_name=...}

We can change the lock status of a peer with:

Code Block

opha-cli.pl act=unlock_peer_islocked {cluster_id=...|server_name=...}

...

Setup DB indexed. This is run by the installer during installation or upgrade:

Code Block
opha-cli.pl act=setup-db 

Encryption

The primary can push the encryption key to all the pollers by running the following command: 

Code Block
opha-cli.pl act=push_encryption_key 

It will run just if the server has the role primary and the key was not modified since the last time it was sent. 

To force send it anyway, you can run it with the force=true argument:

Code Block
opha-cli.pl act=getpush_encryption_statuskey force=1