Skip to content

Invoking oracle clone using NetBackup APIs. #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2023

Conversation

rushmeetbahra
Copy link
Contributor

No description provided.

yougotborked
yougotborked previously approved these changes Apr 21, 2023
Copy link

@yougotborked yougotborked left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good other than the wording comments we chatted about.

@danielkempenich
Copy link

Looks good to me.

INSTANCE_NAME = ARGS.mssql_instance
DATABASE_NAME = ARGS.mssql_database
ALT_DB_PATH = ARGS.restore_db_path
ALLDATABASES=[]
print(f"User authentication completed for master server:[{ARGS.master_server}]")
print(f"User authentication completed for primary server:[{ARGS.primary_server}]")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use some async-await methods here to ensure the message is printed only if the common.get_authenticate_token process is done and successfully generates a token?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is mssql scripts so i am not changing the functionality - this change is only to remove "master" usage

print("Pre-recovery check failed. Force kick off clone using --force_clone")

finally:
print("To cleanup the cloned instance, run dbca. Add the instance to /etc/oratab to be discovered by oracle for cleanup.")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this script mainly created for Linux users? If not, should we add cleanup suggestions for Windows users?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, for windows they only need to run dbca. so thats the first half and the second part in case the instance is not discovered and doesn't appear on dbca


asset_id = response_text['data'][0]['id']

print(f"Client asset Id:[{asset_id}]")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we make it guaranteed that this print method runs only if the asset_id is populated after getting a response? So that we can avoid asset_id being null?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am just curious why we are not using async functions here. Since we have HTTP request or RESTAPI calls, each execution may not happen synchronously.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do you see that anything is happening asynchronously here? It looks to me like common.rest_request issues a GET request and waits for the result. The function won't return until that happens.

@rushmeetbahra rushmeetbahra changed the title initial changes to the script Invoking oracle clone using NetBackup APIs. Apr 25, 2023
@rushmeetbahra rushmeetbahra marked this pull request as ready for review October 13, 2023 16:43
# Get oracle_asset info
def get_oracle_asset_info(baseurl, token, asset_type, display_name, database_id):
""" This function return the asset info """
print(f"Get client asset info for Oracle type :[asset_type]")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This f-string is missing its braces.


asset_id = response_text['data'][0]['id']

print(f"Client asset Id:[{asset_id}]")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do you see that anything is happening asynchronously here? It looks to me like common.rest_request issues a GET request and waits for the result. The function won't return until that happens.

@rkennedy rkennedy merged commit 0f32c1c into VeritasOS:master Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants