You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a bit of a research I found that the module automatically detects a GI by stating /etc/oracle/olr.loc and then uses srvctl to manage services. If GI is not detected, it uses DBMS_SERVICE package from within the database.
The calls to srvctl use parameters that look like it's designed for RAC usage (-preferred, -available, -modifyconfig, probably more). The problem here is that those options are unavailable on a non-RAC installation (tested only with 19c, so that's an assumption I can't verify at the moment - below is my srvctl modify service -h output).
A workaround might be to force the module to use DBMS_SERVICE, but there's no interface parameter for that. Will check how I can currently continue by a quick and dirty module modification for now.
I can't suggest a real fix since I don't know how to autodetect this.
srvctl modify service -h
Modifies the configuration for the service.
Usage: srvctl modify service -db <db_unique_name> -service <service_name>
[-role [PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]] [-policy {AUTOMATIC | MANUAL}]
[-notification {TRUE | FALSE}] [-clbgoal {SHORT | LONG}] [-rlbgoal {NONE | SERVICE_TIME | THROUGHPUT}]
[-failovertype {NONE | SESSION | SELECT | TRANSACTION | AUTO}] [-failovermethod {NONE | BASIC}] [-failoverretry ] [-failoverdelay ] [-failover_restore {NONE | LEVEL1}]
[-edition ] [-pdb <pluggable_database>] [-sql_translation_profile <sql_translation_profile>] [-commit_outcome {TRUE | FALSE}]
[-retention ] [replay_init_time <replay_initiation_time>] [-tablefamilyid <table_family_id>] [-drain_timeout ] [-stopoption <stop_option>]
[-session_state {STATIC | DYNAMIC}] [-global_override]
-db <db_unique_name> Unique name for the database
-service Service name
-role Role of the service (primary, physical_standby, logical_standby, snapshot_standby)
-policy Management policy for the service (AUTOMATIC or MANUAL)
-failovertype (NONE | SESSION | SELECT | TRANSACTION | AUTO) Failover type
-failovermethod (NONE | BASIC) Failover method
-failoverdelay <failover_delay> Failover delay (in seconds)
-failoverretry <failover_retries> Number of attempts to retry connection
-failover_restore <failover_restore> Option to restore initial environment for Application Continuity and TAF (NONE or LEVEL1)
-edition Edition (or "" for empty edition value)
-pdb <pluggable_database> Pluggable database name
-clbgoal (SHORT | LONG) Connection Load Balancing Goal. Default is LONG.
-rlbgoal (SERVICE_TIME | THROUGHPUT | NONE) Runtime Load Balancing Goal
-global_override <global_override> Override value to modify the global service attributes. Used with -role, -policy, -notification, -failovertype, -failovermethod, -failoverdelay, -failoverretry, -failover_restore, -edition, -maxlag and -gsmflags. Ignored for a non-global service.
-notification (TRUE | FALSE) Enable Fast Application Notification (FAN) for OCI connections
-sql_translation_profile <sql_translation_profile> Specify a database object for SQL translation profile
-commit_outcome (TRUE | FALSE) Commit outcome
-retention Specifies the number of seconds the commit outcome is retained
-replay_init_time <replay_initiation_time> Seconds after which replay will not be initiated
-session_state <session_state> Session state consistency (STATIC or DYNAMIC)
-tablefamilyid <table_family_id> Set table family ID for a given service
-drain_timeout <drain_timeout> Service drain timeout specified in seconds
-stopoption <stop_options> Options to stop service (e.g. TRANSACTIONAL or IMMEDIATE)
-verbose Verbose output
-help Print usage
The text was updated successfully, but these errors were encountered:
Seems like this is caused by wrong/unfavourable initialization of 2 lists. In the end this leads to srvctl commands with "-preferred" and "-available" to be built also in non-RAC environments.
On my Single Instance environment this works, but don't have a RAC environment where I can test if it still works on RAC.
So for now I don't want to go for a PR.
oracle_services module may return unsuccessfully with
"msg": "Error modifying service. Command: /u01/app/oracle/product/19.3.0.0/db19300_prod/bin/srvctl modify service -d XD002A -s PROFAHR_ADMIN -modifyconfig -preferred None, stdout: PRKO-2002 : Invalid command line option: -modifyconfig\nPRKO-2002 : Invalid command line option: -preferred\n, stderr: "
After a bit of a research I found that the module automatically detects a GI by stating /etc/oracle/olr.loc and then uses srvctl to manage services. If GI is not detected, it uses DBMS_SERVICE package from within the database.
The calls to srvctl use parameters that look like it's designed for RAC usage (-preferred, -available, -modifyconfig, probably more). The problem here is that those options are unavailable on a non-RAC installation (tested only with 19c, so that's an assumption I can't verify at the moment - below is my srvctl modify service -h output).
A workaround might be to force the module to use DBMS_SERVICE, but there's no interface parameter for that. Will check how I can currently continue by a quick and dirty module modification for now.
I can't suggest a real fix since I don't know how to autodetect this.
srvctl modify service -h
Modifies the configuration for the service.
Usage: srvctl modify service -db <db_unique_name> -service <service_name>
[-role [PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]] [-policy {AUTOMATIC | MANUAL}]
[-notification {TRUE | FALSE}] [-clbgoal {SHORT | LONG}] [-rlbgoal {NONE | SERVICE_TIME | THROUGHPUT}]
[-failovertype {NONE | SESSION | SELECT | TRANSACTION | AUTO}] [-failovermethod {NONE | BASIC}] [-failoverretry ] [-failoverdelay ] [-failover_restore {NONE | LEVEL1}]
[-edition ] [-pdb <pluggable_database>] [-sql_translation_profile <sql_translation_profile>] [-commit_outcome {TRUE | FALSE}]
[-retention ] [replay_init_time <replay_initiation_time>] [-tablefamilyid <table_family_id>] [-drain_timeout ] [-stopoption <stop_option>]
[-session_state {STATIC | DYNAMIC}] [-global_override]
-db <db_unique_name> Unique name for the database
-service Service name
-role Role of the service (primary, physical_standby, logical_standby, snapshot_standby)
-policy Management policy for the service (AUTOMATIC or MANUAL)
-failovertype (NONE | SESSION | SELECT | TRANSACTION | AUTO) Failover type
-failovermethod (NONE | BASIC) Failover method
-failoverdelay <failover_delay> Failover delay (in seconds)
-failoverretry <failover_retries> Number of attempts to retry connection
-failover_restore <failover_restore> Option to restore initial environment for Application Continuity and TAF (NONE or LEVEL1)
-edition Edition (or "" for empty edition value)
-pdb <pluggable_database> Pluggable database name
-clbgoal (SHORT | LONG) Connection Load Balancing Goal. Default is LONG.
-rlbgoal (SERVICE_TIME | THROUGHPUT | NONE) Runtime Load Balancing Goal
-global_override <global_override> Override value to modify the global service attributes. Used with -role, -policy, -notification, -failovertype, -failovermethod, -failoverdelay, -failoverretry, -failover_restore, -edition, -maxlag and -gsmflags. Ignored for a non-global service.
-notification (TRUE | FALSE) Enable Fast Application Notification (FAN) for OCI connections
-sql_translation_profile <sql_translation_profile> Specify a database object for SQL translation profile
-commit_outcome (TRUE | FALSE) Commit outcome
-retention Specifies the number of seconds the commit outcome is retained
-replay_init_time <replay_initiation_time> Seconds after which replay will not be initiated
-session_state <session_state> Session state consistency (STATIC or DYNAMIC)
-tablefamilyid <table_family_id> Set table family ID for a given service
-drain_timeout <drain_timeout> Service drain timeout specified in seconds
-stopoption <stop_options> Options to stop service (e.g. TRANSACTIONAL or IMMEDIATE)
-verbose Verbose output
-help Print usage
The text was updated successfully, but these errors were encountered: