Skip to content

feat : Enable automatic restart for vm instances#772

Merged
santhosh-challa merged 11 commits into
masterfrom
Enable_Automatic_Restart_for_VM_Instances
Feb 8, 2023
Merged

feat : Enable automatic restart for vm instances#772
santhosh-challa merged 11 commits into
masterfrom
Enable_Automatic_Restart_for_VM_Instances

Conversation

@shefalibisht1992

@shefalibisht1992 shefalibisht1992 commented Jan 26, 2023

Copy link
Copy Markdown
Contributor

Description

To improve reliability, ensure that Google Cloud Compute Engine service restarts automatically your virtual machine instances when they are terminated due to non-user initiated reasons such as maintenance events, hardware, and software failures.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Jobexector was run to generate data file. The file was uploaded in the s3 batch and shipper was run to fetch the data in the elastic search. Moreover, all three rules written were tested and also, unit test have been created and run against each rule.

  • Job Executor and shipper and policy executor
  • Unit Test

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The commit message/PR follows our guidelines

Other information:

# Conflicts:
#	installer/resources/lambda_rule_engine/files/rule_engine_cloudwatch_gcp_rules.json
#	installer/resources/pacbot_app/files/DB_Policy.sql
#	jobs/pacman-awsrules/src/main/java/com/tmobile/cloud/constants/PacmanRuleConstants.java
@shefalibisht1992 shefalibisht1992 changed the title Enable automatic restart for vm instances feat : Enable automatic restart for vm instances Jan 26, 2023
# Conflicts:
#	installer/resources/lambda_rule_engine/files/rule_engine_cloudwatch_gcp_rules.json
#	installer/resources/pacbot_app/files/DB_Policy.sql
# Conflicts:
#	installer/resources/pacbot_app/files/DB_Policy.sql
(disk.getAsJsonObject().get(PacmanRuleConstants.TYPE).getAsString().equals(PacmanRuleConstants.PERSISTENT)) && (
(disk.getAsJsonObject().get(PacmanRuleConstants.AUTO_DELETE) == null ) || (disk.getAsJsonObject().get(PacmanRuleConstants.AUTO_DELETE) != null &&
disk.getAsJsonObject().get(PacmanRuleConstants.AUTO_DELETE).getAsBoolean()))){
validationResult = false;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For better readability can we refactor disk.getAsJsonObject().get(PacmanRuleConstants.TYPE)
and disk.getAsJsonObject().get(PacmanRuleConstants.AUTO_DELETE) as variables

# Conflicts:
#	installer/resources/lambda_rule_engine/files/rule_engine_cloudwatch_aws_rules.json
#	installer/resources/lambda_rule_engine/files/rule_engine_cloudwatch_gcp_rules.json
#	installer/resources/pacbot_app/files/DB_Policy.sql
@sonarqubecloud

sonarqubecloud Bot commented Feb 8, 2023

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
5.9% 5.9% Duplication

@santhosh-challa santhosh-challa merged commit 6e0d5bf into master Feb 8, 2023
@santhosh-challa santhosh-challa deleted the Enable_Automatic_Restart_for_VM_Instances branch February 8, 2023 06:13
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.

4 participants