diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..e982771 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,213 @@ +name: EC2 Deploy + +on: + push: + branches: + - devops/a4 + tags: + - deploy-dev + - deploy-prod + + workflow_dispatch: + inputs: + stage: + description: "Select stage to deploy" + required: true + default: dev + type: choice + options: + - dev + - prod + +env: + AWS_REGION: ap-south-1 + TF_WORKING_DIR: ./terraform + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + # Checkout Repository + - name: Checkout repository + uses: actions/checkout@v4 + + # Configure AWS Credentials + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ env.AWS_REGION }} + + # Install Terraform + - name: Setup Terraform + uses: hashicorp/setup-terraform@v3 + + # Determine Stage - dev/prod defaults to dev + - name: Determine Stage + id: set_stage + run: | + if [[ "${GITHUB_REF}" == "refs/tags/deploy-dev" ]]; then + echo "STAGE=dev" >> $GITHUB_ENV + elif [[ "${GITHUB_REF}" == "refs/tags/deploy-prod" ]]; then + echo "STAGE=prod" >> $GITHUB_ENV + elif [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then + echo "STAGE=${{ github.event.inputs.stage }}" >> $GITHUB_ENV + else + echo "STAGE=dev" >> $GITHUB_ENV # fallback + fi + + echo "šŸ› ļø Deployment stage: $STAGE" + + # Clone private repo for prod config + - name: Clone Private Repo for Prod Config + if: env.STAGE == 'prod' + run: | + echo "šŸ”’ Cloning private repo for prod configuration..." + git clone https://${{ secrets.PRIVATE_REPO_KEY }}@${{ secrets.PRIVATE_REPO }} private-config + echo "āœ… Cloned private config repo" + + # Terraform Init + - name: Terraform Init + working-directory: ${{ env.TF_WORKING_DIR }} + run: terraform init + + # Terraform Apply (Full Infra) + - name: Terraform Apply + working-directory: ${{ env.TF_WORKING_DIR }} + run: | + if [ "${STAGE}" == "prod" ]; then + echo "Applying Terraform with private prod configuration..." + terraform apply -var-file=../private-config/prod_config.tfvars -auto-approve + else + echo "Applying Terraform with public dev configuration..." + terraform apply -var-file="${STAGE}_config.tfvars" -auto-approve + fi + + # Get Outputs: App IP, Verifier IP, S3 Bucket + - name: Get Terraform Outputs + working-directory: ${{ env.TF_WORKING_DIR }} + run: | + INSTANCE_IP=$(terraform output -raw instance_public_ip) + S3_BUCKET=$(terraform output -raw s3_log_bucket) + echo "INSTANCE_IP=$INSTANCE_IP" >> $GITHUB_ENV + echo "S3_BUCKET=$S3_BUCKET" >> $GITHUB_ENV + + echo "šŸ“¦ App IP: $INSTANCE_IP" + echo "🪣 S3 Bucket: $S3_BUCKET" + + # Wait for App Initialization + - name: Wait for App Initialization + run: | + echo "ā³ Waiting 90 seconds for app EC2 to initialize..." + sleep 90 + + # Validate App Health + - name: Validate App Health + run: | + echo -e "\nšŸ“¦ Full Response from App:\n" + curl -s http://${{ env.INSTANCE_IP }}:80 || echo "āŒ Failed to get response" + echo -e "\n" + echo "Checking app health at http://${{ env.INSTANCE_IP }}:80" + for i in {1..10}; do + STATUS=$(curl -o /dev/null -s -w "%{http_code}" http://${{ env.INSTANCE_IP }}:80) + if [[ "$STATUS" == "200" ]]; then + echo "āœ… App is healthy (HTTP 200)" + exit 0 + else + echo "Attempt $i: got HTTP $STATUS" + sleep 10 + fi + done + echo "āŒ App failed health check" + exit 1 + + # Provision Verifier EC2 + - name: Terraform Apply Verifier EC2 + working-directory: ${{ env.TF_WORKING_DIR }} + run: | + terraform apply -var-file="${STAGE}_config.tfvars" \ + -target=aws_instance.log_verifier -auto-approve + + # Get Verifier IP + - name: Get Verifier IP + working-directory: ${{ env.TF_WORKING_DIR }} + run: | + VERIFIER_IP=$(terraform output -raw verifier_instance_public_ip) + echo "VERIFIER_IP=$VERIFIER_IP" >> $GITHUB_ENV + echo "šŸ”‘ Verifier IP: $VERIFIER_IP" + + # Setup SSH Key for EC2 Access + - name: Setup SSH Key for EC2 Access + uses: webfactory/ssh-agent@v0.8.0 + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + + # Wait for Verifier EC2 Initialization + - name: Wait for Verifier EC2 Initialization + run: | + echo "ā³ Waiting 60 seconds for verifier EC2 to initialize..." + sleep 60 + + # SSH into Verifier EC2 and Validate Logs + - name: Validate Logs from Verifier EC2 + run: | + echo "šŸ” Validating logs in S3 from verifier EC2" + + for attempt in {1..5}; do + ssh -o StrictHostKeyChecking=no ubuntu@${VERIFIER_IP} "echo 'āœ… SSH to verifier successful'" && break + echo "ā³ Verifier not ready, retrying SSH (attempt $attempt)..." + sleep 15 + done + + for log in system/cloud-init.log app/my-app.log; do + ssh -o StrictHostKeyChecking=no ubuntu@${VERIFIER_IP} \ + "if aws s3 ls s3://${S3_BUCKET}/${STAGE}/$log > /dev/null 2>&1; then + echo 'āœ… Found: $log'; + else + echo 'āŒ Missing: $log'; exit 1; + fi" + done + echo "šŸŽ‰ All required logs are present in S3" + + # Print Logs from Verifier EC2 + - name: Print Logs from Verifier EC2 + run: | + echo "šŸ“„ Fetching logs from /mylogs/${STAGE} on verifier EC2" + + for attempt in {1..5}; do + ssh -o StrictHostKeyChecking=no ubuntu@${VERIFIER_IP} "echo 'āœ… SSH to verifier successful for log fetch'" && break + echo "ā³ Verifier not ready for log fetch, retrying SSH (attempt $attempt)..." + sleep 15 + done + + ssh -o StrictHostKeyChecking=no ubuntu@${VERIFIER_IP} \ + "if [ -f /mylogs/${STAGE}/system/cloud-init.log ]; then + echo 'šŸ“„ ====== system/cloud-init.log ======' + cat /mylogs/${STAGE}/system/cloud-init.log | tail -n 20 + else + echo 'āŒ system/cloud-init.log not found' + fi" + + ssh -o StrictHostKeyChecking=no ubuntu@${VERIFIER_IP} \ + "if [ -f /mylogs/${STAGE}/app/my-app.log ]; then + echo 'šŸ“„ ====== app/my-app.log ======' + cat /mylogs/${STAGE}/app/my-app.log | tail -n 20 + else + echo 'āŒ app/my-app.log not found' + fi" + + echo "āœ… Printed last 20 lines of logs from verifier EC2" + + # Destroy Infrastructure + - name: Destroy Infrastructure + if: always() + working-directory: ${{ env.TF_WORKING_DIR }} + run: | + echo "šŸ—‘ļø Destroying infrastructure for stage: ${STAGE}" + if [ "${STAGE}" == "prod" ]; then + terraform destroy -var-file=../private-config/prod_config.tfvars -auto-approve + else + terraform destroy -var-file="${STAGE}_config.tfvars" -auto-approve + fi diff --git a/README.md b/README.md index fba2c1a..e5b27b0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# AWS EC2 Auto Deployment with Terraform & Shell Scripts +# AWS EC2 Auto Deployment with Terraform & GitHub Actions -This project automates the provisioning of an EC2 instance and the deployment of your application on AWS using Terraform and shell scripts. It supports different environments (Dev, Prod) through configuration files and scripts. +This project automates the provisioning of EC2 instances and the deployment of your application on AWS using **Terraform** and **GitHub Actions**. It supports different environments (Dev, Prod) via configuration files. --- @@ -9,119 +9,211 @@ This project automates the provisioning of an EC2 instance and the deployment of ``` tech_eazy_devops_git-user-9/ ā”œā”€ā”€ README.md # Project documentation -ā”œā”€ā”€ terraform/ # Contains Terraform configurations +ā”œā”€ā”€ .gitignore # Lists files to exclude from version control +ā”œā”€ā”€ .github/ +│ └── workflows/ +│ └── deploy.yml # GitHub Actions workflow for deployment +ā”œā”€ā”€ terraform/ # Terraform configurations │ ā”œā”€ā”€ main.tf # Main Terraform configuration file │ ā”œā”€ā”€ outputs.tf # Defines Terraform outputs (e.g., EC2 public IP) -│ ā”œā”€ā”€ variables.tf # Declares input variables for Terraform -│ ā”œā”€ā”€ dev_config.tfvars # Terraform variable values for the 'dev' environment -│ └── prod_config.tfvars # Terraform variable values for the 'prod' environment -└── scripts/ # Shell scripts for deployment and configuration - ā”œā”€ā”€ deploy.sh # Automates the Terraform apply process for a given environment - ā”œā”€ā”€ dev_script.sh # User-data script for configuring EC2 in the 'dev' environment - └── prod_script.sh # User-data script for configuring EC2 in the 'prod' environment +│ ā”œā”€ā”€ variables.tf # Common variables (e.g., region, key pair name) +│ ā”œā”€ā”€ dev_config.tfvars # Variable values for 'Dev' environment +│ ā”œā”€ā”€ prod_config.tfvars # Variable values for 'Prod' environment +ā”œā”€ā”€ scripts/ # Shell scripts for configuration and log validation +│ ā”œā”€ā”€ deploy.sh # [OBSOLETE] Legacy deployment script (replaced by deploy.yml) +│ ā”œā”€ā”€ dev_script.sh # Dev-specific configuration script for EC2 +│ ā”œā”€ā”€ prod_script.sh # Production-specific script for EC2 +│ ā”œā”€ā”€ verify_logs.sh # Validates and uploads logs +ā”œā”€ā”€ mylogs/ # Application and system logs +│ ā”œā”€ā”€ app/ # Stores runtime application logs +│ │ └── my-app.log # Main application log +│ └── system/ # Tracks provisioning/system logs +│ └── cloud-init.log # Logs of initialization processes ``` --- ## āš™ļø **Prerequisites** -Before you begin, ensure you have the following: +* **Fork this repository** – You must fork it to your own GitHub account so you can add secrets (you cannot add secrets to a repo you don't own). -- **AWS Account** with EC2 access and permissions to create resources -- **IAM User** with programmatic access (access key ID and secret access key) -- **AWS CLI** installed and configured -- **Terraform** installed (version >= 1.0 recommended) -- **Git** (optional, for repository operations) +* **AWS Account** with IAM permissions to provision EC2, S3, etc. + +* **GitHub Secrets** + + * `AWS_ACCESS_KEY_ID` – IAM user access key + * `AWS_SECRET_ACCESS_KEY` – IAM user secret key + * `SSH_PRIVATE_KEY` – Private key for SSH access to EC2 instances +* Terraform installed (for local testing if required) +* EC2 Key Pair configured in AWS and referenced in Terraform configs --- -## šŸ” **AWS Credentials Setup** +## šŸ”’ **Private Repository Setup for Production Config** -You must set your AWS credentials in your local environment so Terraform can authenticate with AWS. +For enhanced security, production configuration should be stored in a separate private repository: -### Option 1: Using AWS CLI (Recommended) +### **Step 1: Create Private Repository** -```bash -aws configure +1. Create a new **private repository** on GitHub (e.g., `your-username/terraform-prod-configs`) +2. Copy the `prod_config.tfvars` file from `./terraform/prod_config.tfvars` in this repository +3. Add the `prod_config.tfvars` file to your private repository + +### **Step 2: Generate Personal Access Token (PAT)** + +1. Go to GitHub Settings → Developer settings → Personal Access Tokens → Tokens (classic) +2. Generate a new token with **repo** access permissions +3. Copy the generated token for use in GitHub Secrets + +### **Step 3: Configure Additional GitHub Secrets** + +Add these secrets to your forked repository: + +* **`PRIVATE_REPO`** – URL of your private repository + ``` + github.com/your-username/terraform-prod-configs + ``` + (note: do not keep https:// in repo link above) + +* **`PRIVATE_REPO_KEY`** – Personal Access Token with repo access + ``` + ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + ``` + +āš ļø **Important**: Replace `your-username` with your actual GitHub username and ensure the private repository contains your production Terraform variables. + +--- + +## šŸ”‘ **Step: Configure Terraform Variables** + +Before triggering deployment, update the Terraform configuration files for your AWS environment: + +1. Open `terraform/variables.tf` +2. Set the default values for common variables like EC2 Key Pair name: + +```hcl +variable "key_name" { + default = "your-ec2-keypair-name" # Set your AWS Key Pair name +} ``` -You'll be prompted to input your: -- AWS Access Key ID -- AWS Secret Access Key -- Default region name (e.g., `ap-south-1`) -- Default output format (e.g., `json`) +3. Edit `terraform/dev_config.tfvars` and `terraform/prod_config.tfvars`: -### Option 2: Set environment variables directly +* Example (`dev_config.tfvars`): -```bash -export AWS_ACCESS_KEY_ID=your_access_key -export AWS_SECRET_ACCESS_KEY=your_secret_key -export AWS_DEFAULT_REGION=ap-south-1 +```hcl +key_name = "your-ec2-keypair-name" +``` + +* Example (`prod_config.tfvars`): + +```hcl +key_name = "your-ec2-keypair-name" ``` +āš ļø Ensure your EC2 Key Pair exists in the selected AWS region. +*ap-south-1 (Mumbai) is being used by default in this project, so kindly create a ec2 key pair on this region for smoother experience during execution. Otherwise kindly change ap-south-1 at all places to your preferred region* + --- -## šŸš€ **How to Deploy** +## šŸ” **How to Get SSH Private Key from .pem File** + +When you create an AWS EC2 Key Pair, AWS provides a `.pem` file. To use this in GitHub Actions, you must convert it to a format that can be stored as a secret. + +### Steps: + +1. **Generate the Key Pair in AWS Console** (download the `.pem` file) +2. Open the `.pem` file in a text editor and copy its contents. +3. Add it as a GitHub secret named `SSH_PRIVATE_KEY` in your forked repository. -### 1ļøāƒ£ Clone the Repository +Example: ```bash -git clone https://github.com/git-user-9/tech_eazy_devops_git-user-9.git app -cd app +cat path/to/your-key.pem ``` -### 2ļøāƒ£ Run the Deployment Script +Copy the entire output (including `-----BEGIN RSA PRIVATE KEY-----` and `-----END RSA PRIVATE KEY-----`) into the GitHub secret. + +āš ļø Ensure your `.pem` file permissions are secure: ```bash -./scripts/deploy.sh dev # For Dev environment -./scripts/deploy.sh prod # For Prod environment +chmod 400 path/to/your-key.pem ``` -The script will: -- Load the corresponding Terraform variable file -- Initialize and apply the Terraform configuration -- Output the public IP of the created EC2 instance -- Upload logs to S3 bucket -- Shutdown the instance after 10-15 minutes (configurable) +--- + +## šŸš€ **Deployment Workflow** + +The deployment is managed via GitHub Actions. + +### āœ… Trigger Methods + +* **Push to Branch**: `devops/a3` +* **Git Tags**: `deploy-dev` (for Dev), `deploy-prod` (for Prod) +* **Manual Trigger**: Run from GitHub Actions → Select Stage (dev/prod) -### 3ļøāƒ£ Access the Application +--- + +#### šŸ·ļø **Trigger Deployment via Git Tags** + +To deploy to **Dev** or **Prod**, create and push the appropriate Git tag: -Visit the public IP shown in the terminal: +*āš ļø Make sure your working directory is clean (git status) before creating tags to avoid pushing unwanted changes.* +##### For Dev Environment: + +```bash +git tag deploy-dev +git push origin deploy-dev ``` -http://:80 + +##### For Prod Environment: + +```bash +git tag deploy-prod +git push origin deploy-prod ``` +The GitHub Actions workflow will automatically detect the tag and deploy to the respective environment. + --- -## šŸ› ļø **What Happens Behind the Scenes** +--- -### Terraform provisions: -- EC2 instance in default VPC -- Security group with ports 22 (SSH) and 80 (HTTP) open +### šŸ“– Overview of Workflow -### User Data (inside shell script): -- Updates the system -- Installs AWS CLI, curl, unzip, Java 21, Git, and Maven -- Clones and builds your application -- Launches the application on port 80 -- Uploads logs to S3 bucket -- Shuts down the instance after 10-15 minutes (configurable) +The workflow performs the following steps: ---- +1. **Checkout Repository** – Fetches the code from the repository. -## āœ… **Security Notes** +2. **Configure AWS Credentials** – Uses GitHub Secrets to authenticate with AWS. -- No sensitive keys are stored in the repo -- Make sure your security group is restricted to specific IPs if used in production -- Rotate AWS credentials regularly +3. **Setup Terraform** – Installs Terraform and initializes configuration. ---- +4. **Determine Stage** – Sets the target environment (dev or prod) based on trigger type. + +5. **Provision App EC2 Instance (Write Access)** + + * Deploys the first EC2 instance with **write access to S3**. + * Installs required software (Java, Maven, Git, etc.). + * Pulls source code from the repository and builds the Maven application. + * Runs the application and pushes logs (system and app logs) to the S3 bucket. + +6. **Provision Verifier EC2 Instance (Read Access)** + + * Deploys a second EC2 instance with **read-only access to S3**. + * Uses AWS CLI to pull logs from the S3 bucket to the instance. + +7. **Log Validation via SSH** -## šŸ’¬ **FAQ** + * SSH into the Verifier EC2 instance. + * Validates that required logs exist in S3. + * Prints the last 20 lines of each log for inspection. -**Q: Can I deploy to a different AWS region?** -Yes. Modify the `aws_region` value in `terraform/variables.tf`, `dev_config.tfvars` and `prod_config.tfvars` +8. **App Health Check** – Ensures the application is healthy (HTTP 200 response). +9. **Destroy Infrastructure** – After validation, destroys all provisioned resources and cleans up Terraform workspaces. +This workflow fully automates the lifecycle: provisioning, deployment, validation, and cleanup, ensuring no manual intervention is needed during the process. +--- \ No newline at end of file diff --git a/mylogs/app/my-app.log b/mylogs/app/my-app.log new file mode 100644 index 0000000..a9322b8 --- /dev/null +++ b/mylogs/app/my-app.log @@ -0,0 +1,19 @@ + + . ____ _ __ _ _ + /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ +( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ + \\/ ___)| |_)| | | | | || (_| | ) ) ) ) + ' |____| .__|_| |_|_| |_\__, | / / / / + =========|_|==============|___/=/_/_/_/ + + :: Spring Boot :: (v3.4.6) + +2025-07-09T02:15:37.428Z INFO 1021 --- [techeazy-devops] [ main] c.t.devops.TecheazyDevopsApplication : Starting TecheazyDevopsApplication v0.0.1-SNAPSHOT using Java 21.0.7 with PID 1021 (/home/ubuntu/app/target/techeazy-devops-0.0.1-SNAPSHOT.jar started by root in /home/ubuntu/app) +2025-07-09T02:15:37.434Z INFO 1021 --- [techeazy-devops] [ main] c.t.devops.TecheazyDevopsApplication : No active profile set, falling back to 1 default profile: "default" +2025-07-09T02:15:39.092Z INFO 1021 --- [techeazy-devops] [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 80 (http) +2025-07-09T02:15:39.129Z INFO 1021 --- [techeazy-devops] [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2025-07-09T02:15:39.130Z INFO 1021 --- [techeazy-devops] [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.41] +2025-07-09T02:15:39.384Z INFO 1021 --- [techeazy-devops] [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext +2025-07-09T02:15:39.387Z INFO 1021 --- [techeazy-devops] [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1866 ms +2025-07-09T02:15:40.741Z INFO 1021 --- [techeazy-devops] [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port 80 (http) with context path '/' +2025-07-09T02:15:40.779Z INFO 1021 --- [techeazy-devops] [ main] c.t.devops.TecheazyDevopsApplication : Started TecheazyDevopsApplication in 4.164 seconds (process running for 4.981) diff --git a/mylogs/system/cloud-init.log b/mylogs/system/cloud-init.log new file mode 100644 index 0000000..6178c94 --- /dev/null +++ b/mylogs/system/cloud-init.log @@ -0,0 +1,829 @@ +2025-07-09 02:14:54,824 - log_util.py[DEBUG]: Cloud-init v. 25.1.2-0ubuntu0~24.04.1 running 'init-local' at Wed, 09 Jul 2025 02:14:54 +0000. Up 5.89 seconds. +2025-07-09 02:14:54,824 - main.py[INFO]: PID [1] started cloud-init 'init-local'. +2025-07-09 02:14:54,824 - main.py[DEBUG]: No kernel command line url found. +2025-07-09 02:14:54,824 - main.py[DEBUG]: Closing stdin +2025-07-09 02:14:54,827 - util.py[DEBUG]: Writing to /var/log/cloud-init.log - ab: [640] 0 bytes +2025-07-09 02:14:54,828 - util.py[DEBUG]: Changing the ownership of /var/log/cloud-init.log to 102:4 +2025-07-09 02:14:54,828 - util.py[DEBUG]: Reading from /var/lib/cloud/data/python-version (quiet=False) +2025-07-09 02:14:54,829 - util.py[DEBUG]: Reading 4 bytes from /var/lib/cloud/data/python-version +2025-07-09 02:14:54,829 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/instance/boot-finished +2025-07-09 02:14:54,829 - handlers.py[DEBUG]: start: init-local/check-cache: attempting to read from cache [check] +2025-07-09 02:14:54,829 - util.py[DEBUG]: Reading from /var/lib/cloud/instance/obj.pkl (quiet=False) +2025-07-09 02:14:54,830 - util.py[DEBUG]: Reading 14715 bytes from /var/lib/cloud/instance/obj.pkl +2025-07-09 02:14:54,855 - stages.py[DEBUG]: cache invalid in datasource: DataSourceEc2Local +2025-07-09 02:14:54,855 - handlers.py[DEBUG]: finish: init-local/check-cache: SUCCESS: cache invalid in datasource: DataSourceEc2Local +2025-07-09 02:14:54,855 - stages.py[DEBUG]: Using distro class +2025-07-09 02:14:54,855 - sources[DEBUG]: Looking for data source in: ['Ec2', 'None'], via packages ['', 'cloudinit.sources'] that matches dependencies ['FILESYSTEM'] +2025-07-09 02:14:54,857 - sources[DEBUG]: Searching for local data source in: ['DataSourceEc2Local'] +2025-07-09 02:14:54,857 - handlers.py[DEBUG]: start: init-local/search-Ec2Local: searching for local data from DataSourceEc2Local +2025-07-09 02:14:54,857 - sources[DEBUG]: Seeing if we can get any data from +2025-07-09 02:14:54,857 - sources[DEBUG]: Update datasource metadata and network config due to events: boot-new-instance +2025-07-09 02:14:54,857 - util.py[DEBUG]: Reading from /sys/hypervisor/uuid (quiet=False) +2025-07-09 02:14:54,857 - util.py[DEBUG]: Reading 37 bytes from /sys/hypervisor/uuid +2025-07-09 02:14:54,857 - dmi.py[DEBUG]: querying dmi data /sys/class/dmi/id/product_serial +2025-07-09 02:14:54,857 - dmi.py[DEBUG]: querying dmi data /sys/class/dmi/id/chassis_asset_tag +2025-07-09 02:14:54,857 - dmi.py[DEBUG]: querying dmi data /sys/class/dmi/id/sys_vendor +2025-07-09 02:14:54,857 - dmi.py[DEBUG]: querying dmi data /sys/class/dmi/id/product_name +2025-07-09 02:14:54,858 - sources[DEBUG]: Detected DataSourceEc2Local +2025-07-09 02:14:54,858 - DataSourceEc2.py[DEBUG]: strict_mode: warn, cloud_name=aws cloud_platform=ec2 +2025-07-09 02:14:54,858 - util.py[DEBUG]: Reading from /sys/class/net/enX0/name_assign_type (quiet=False) +2025-07-09 02:14:54,858 - util.py[DEBUG]: Reading 2 bytes from /sys/class/net/enX0/name_assign_type +2025-07-09 02:14:54,858 - util.py[DEBUG]: Reading from /sys/class/net/lo/address (quiet=False) +2025-07-09 02:14:54,858 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/lo/address +2025-07-09 02:14:54,858 - util.py[DEBUG]: Reading from /sys/class/net/lo/device/device (quiet=False) +2025-07-09 02:14:54,858 - util.py[DEBUG]: Reading from /sys/class/net/enX0/address (quiet=False) +2025-07-09 02:14:54,858 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/enX0/address +2025-07-09 02:14:54,858 - util.py[DEBUG]: Reading from /sys/class/net/enX0/device/device (quiet=False) +2025-07-09 02:14:54,858 - util.py[DEBUG]: Reading from /sys/class/net/enX0/carrier (quiet=False) +2025-07-09 02:14:54,858 - net[DEBUG]: Interface has no carrier: enX0 +2025-07-09 02:14:54,858 - util.py[DEBUG]: Reading from /sys/class/net/enX0/dormant (quiet=False) +2025-07-09 02:14:54,859 - util.py[DEBUG]: Reading from /sys/class/net/enX0/operstate (quiet=False) +2025-07-09 02:14:54,859 - util.py[DEBUG]: Reading 5 bytes from /sys/class/net/enX0/operstate +2025-07-09 02:14:54,859 - ephemeral.py[DEBUG]: No connectivity URLs provided. Skipping connectivity check before ephemeral network setup. +2025-07-09 02:14:54,859 - ephemeral.py[DEBUG]: No connectivity to IMDS, attempting DHCP setup. +2025-07-09 02:14:54,859 - subp.py[DEBUG]: Running command ['ip', '--json', 'addr'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:54,881 - performance.py[DEBUG]: Running ['ip', '--json', 'addr'] took 0.022 seconds +2025-07-09 02:14:54,881 - ephemeral.py[DEBUG]: No connectivity URLs provided. Skipping connectivity check before ephemeral network setup. +2025-07-09 02:14:54,881 - distros[DEBUG]: Using configured dhcp client priority list: ['dhcpcd', 'dhclient', 'udhcpc'] +2025-07-09 02:14:54,881 - distros[DEBUG]: DHCP client selected: dhcpcd +2025-07-09 02:14:54,881 - dhcp.py[DEBUG]: Performing a dhcp discovery on enX0 +2025-07-09 02:14:54,881 - subp.py[DEBUG]: Running command ['ip', 'link', 'set', 'dev', 'enX0', 'up'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:54,883 - util.py[DEBUG]: Reading from /sys/class/net/enX0/type (quiet=False) +2025-07-09 02:14:54,883 - util.py[DEBUG]: Reading 2 bytes from /sys/class/net/enX0/type +2025-07-09 02:14:54,883 - subp.py[DEBUG]: Running command ['dhcpcd', '--ipv4only', '--waitip', '--persistent', '--noarp', '--script=/bin/true', 'enX0'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:56,468 - performance.py[DEBUG]: Running ['dhcpcd', '--ipv4only', '--waitip', '--persistent', '--noarp', '--script=/bin/true', 'enX0'] took 1.584 seconds +2025-07-09 02:14:56,468 - subp.py[DEBUG]: Running command ['dhcpcd', '--dumplease', '--ipv4only', 'enX0'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:56,472 - dhcp.py[DEBUG]: Parsing dhcpcd lease for interface enX0: 'reason=BOUND\ninterface=enX0\nprotocol=dhcp\nip_address=172.31.7.189\nsubnet_cidr=20\nnetwork_number=172.31.0.0\nsubnet_mask=255.255.240.0\nrouters=172.31.0.1\ndomain_name_servers=172.31.0.2\nhost_name=ip-172-31-7-189\ndomain_name=ap-south-1.compute.internal\ninterface_mtu=9001\nbroadcast_address=172.31.15.255\ndhcp_lease_time=3600\ndhcp_message_type=5\ndhcp_server_identifier=172.31.0.1\n' +2025-07-09 02:14:56,472 - util.py[DEBUG]: Reading from /var/lib/dhcpcd/enX0.lease (quiet=False) +2025-07-09 02:14:56,472 - util.py[DEBUG]: Reading 548 bytes from /var/lib/dhcpcd/enX0.lease +2025-07-09 02:14:56,472 - subp.py[DEBUG]: Running command ['dhcpcd', '--ipv4only', '--waitip', '--persistent', '--noarp', '--script=/bin/true', 'enX0', '-P'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:56,473 - util.py[DEBUG]: Reading from /run/dhcpcd/enX0-4.pid (quiet=False) +2025-07-09 02:14:56,474 - util.py[DEBUG]: Reading 4 bytes from /run/dhcpcd/enX0-4.pid +2025-07-09 02:14:56,474 - util.py[DEBUG]: Reading from /proc/435/stat (quiet=True) +2025-07-09 02:14:56,474 - util.py[DEBUG]: Reading 299 bytes from /proc/435/stat +2025-07-09 02:14:56,474 - dhcp.py[DEBUG]: killing dhcpcd with pid=435 gid=434 +2025-07-09 02:14:56,474 - ephemeral.py[DEBUG]: Received dhcp lease on enX0 for 172.31.7.189/255.255.240.0 +2025-07-09 02:14:56,474 - ephemeral.py[DEBUG]: Attempting setup of ephemeral network on enX0 with 172.31.7.189/20 brd 172.31.15.255 +2025-07-09 02:14:56,475 - subp.py[DEBUG]: Running command ['ip', '--json', 'addr'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:56,477 - ephemeral.py[DEBUG]: Skip adding ip address: enX0 already has address 172.31.7.189 +2025-07-09 02:14:56,477 - ephemeral.py[DEBUG]: Skip bringing up network link: interface enX0 is already up +2025-07-09 02:14:56,477 - subp.py[DEBUG]: Running command ['ip', 'route', 'show', '0.0.0.0/0'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:56,479 - ephemeral.py[DEBUG]: Skip ephemeral route setup. enX0 already has default route: default via 172.31.0.1 dev enX0 proto dhcp src 172.31.7.189 metric 1002 mtu 9001 +2025-07-09 02:14:56,480 - ephemeral.py[DEBUG]: Successfully brought up enX0 for ephemeral ipv4 networking. +2025-07-09 02:14:56,480 - util.py[DEBUG]: Reading from /sys/class/net/enX0/operstate (quiet=False) +2025-07-09 02:14:56,480 - util.py[DEBUG]: Reading 3 bytes from /sys/class/net/enX0/operstate +2025-07-09 02:14:56,480 - ephemeral.py[DEBUG]: Successfully brought up enX0 for ephemeral ipv6 networking. +2025-07-09 02:14:56,484 - DataSourceEc2.py[DEBUG]: Removed the following from metadata urls: ['http://instance-data.:8773'] +2025-07-09 02:14:56,484 - DataSourceEc2.py[DEBUG]: Fetching Ec2 IMDSv2 API Token +2025-07-09 02:14:56,484 - url_helper.py[DEBUG]: [0/1] open 'http://169.254.169.254/latest/api/token' with {'url': 'http://169.254.169.254/latest/api/token', 'stream': False, 'allow_redirects': True, 'method': 'PUT', 'timeout': 50.0, 'headers': {'X-aws-ec2-metadata-token-ttl-seconds': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,495 - url_helper.py[DEBUG]: Read from http://169.254.169.254/latest/api/token (200, 56b) after 1 attempts +2025-07-09 02:14:56,495 - DataSourceEc2.py[DEBUG]: Using metadata source: 'http://169.254.169.254' +2025-07-09 02:14:56,495 - url_helper.py[DEBUG]: [0/1] open 'http://169.254.169.254/2021-03-23/meta-data/instance-id' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/instance-id', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,497 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/instance-id (200, 19b) after 1 attempts +2025-07-09 02:14:56,497 - DataSourceEc2.py[DEBUG]: Found preferred metadata version 2021-03-23 +2025-07-09 02:14:56,498 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/user-data' with {'url': 'http://169.254.169.254/2021-03-23/user-data', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,499 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/user-data (200, 985b) after 1 attempts +2025-07-09 02:14:56,500 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,501 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/ (200, 331b) after 1 attempts +2025-07-09 02:14:56,501 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/block-device-mapping/' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/block-device-mapping/', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,503 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/block-device-mapping/ (200, 30b) after 1 attempts +2025-07-09 02:14:56,503 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/block-device-mapping/ami' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/block-device-mapping/ami', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,505 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/block-device-mapping/ami (200, 4b) after 1 attempts +2025-07-09 02:14:56,506 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/block-device-mapping/ephemeral0' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/block-device-mapping/ephemeral0', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,508 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/block-device-mapping/ephemeral0 (200, 3b) after 1 attempts +2025-07-09 02:14:56,508 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/block-device-mapping/ephemeral1' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/block-device-mapping/ephemeral1', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,510 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/block-device-mapping/ephemeral1 (200, 3b) after 1 attempts +2025-07-09 02:14:56,510 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/block-device-mapping/root' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/block-device-mapping/root', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,512 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/block-device-mapping/root (200, 9b) after 1 attempts +2025-07-09 02:14:56,512 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/events/' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/events/', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,514 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/events/ (200, 12b) after 1 attempts +2025-07-09 02:14:56,514 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/events/maintenance/' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/events/maintenance/', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,515 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/events/maintenance/ (200, 17b) after 1 attempts +2025-07-09 02:14:56,516 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/events/maintenance/history' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/events/maintenance/history', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,517 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/events/maintenance/history (200, 2b) after 1 attempts +2025-07-09 02:14:56,517 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/events/maintenance/scheduled' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/events/maintenance/scheduled', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,520 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/events/maintenance/scheduled (200, 2b) after 1 attempts +2025-07-09 02:14:56,520 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/hibernation/' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/hibernation/', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,522 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/hibernation/ (200, 10b) after 1 attempts +2025-07-09 02:14:56,523 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/hibernation/configured' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/hibernation/configured', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,525 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/hibernation/configured (200, 5b) after 1 attempts +2025-07-09 02:14:56,525 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/iam/' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/iam/', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,527 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/iam/ (200, 26b) after 1 attempts +2025-07-09 02:14:56,528 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/iam/info' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/iam/info', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,529 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/iam/info (200, 217b) after 1 attempts +2025-07-09 02:14:56,529 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/identity-credentials/' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/identity-credentials/', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,531 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/identity-credentials/ (200, 4b) after 1 attempts +2025-07-09 02:14:56,531 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/identity-credentials/ec2/' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/identity-credentials/ec2/', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,533 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/identity-credentials/ec2/ (200, 26b) after 1 attempts +2025-07-09 02:14:56,533 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/identity-credentials/ec2/info' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/identity-credentials/ec2/info', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,536 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/identity-credentials/ec2/info (200, 98b) after 1 attempts +2025-07-09 02:14:56,536 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/metrics/' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/metrics/', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,538 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/metrics/ (200, 7b) after 1 attempts +2025-07-09 02:14:56,539 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/metrics/vhostmd' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/metrics/vhostmd', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,540 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/metrics/vhostmd (200, 38b) after 1 attempts +2025-07-09 02:14:56,540 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,542 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/ (200, 11b) after 1 attempts +2025-07-09 02:14:56,542 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,544 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/ (200, 5b) after 1 attempts +2025-07-09 02:14:56,544 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,546 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/ (200, 18b) after 1 attempts +2025-07-09 02:14:56,546 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,547 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/ (200, 230b) after 1 attempts +2025-07-09 02:14:56,547 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/ipv4-associations/' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/ipv4-associations/', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,549 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/ipv4-associations/ (200, 14b) after 1 attempts +2025-07-09 02:14:56,549 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/ipv4-associations/43.204.147.225' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/ipv4-associations/43.204.147.225', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,551 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/ipv4-associations/43.204.147.225 (200, 12b) after 1 attempts +2025-07-09 02:14:56,551 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/device-number' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/device-number', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,554 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/device-number (200, 1b) after 1 attempts +2025-07-09 02:14:56,554 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/interface-id' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/interface-id', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,556 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/interface-id (200, 21b) after 1 attempts +2025-07-09 02:14:56,556 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/local-hostname' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/local-hostname', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,558 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/local-hostname (200, 43b) after 1 attempts +2025-07-09 02:14:56,558 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/local-ipv4s' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/local-ipv4s', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,559 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/local-ipv4s (200, 12b) after 1 attempts +2025-07-09 02:14:56,560 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/mac' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/mac', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,562 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/mac (200, 17b) after 1 attempts +2025-07-09 02:14:56,562 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/owner-id' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/owner-id', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,563 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/owner-id (200, 12b) after 1 attempts +2025-07-09 02:14:56,564 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/public-hostname' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/public-hostname', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,565 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/public-hostname (200, 51b) after 1 attempts +2025-07-09 02:14:56,566 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/public-ipv4s' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/public-ipv4s', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,567 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/public-ipv4s (200, 14b) after 1 attempts +2025-07-09 02:14:56,567 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/security-group-ids' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/security-group-ids', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,573 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/security-group-ids (200, 20b) after 1 attempts +2025-07-09 02:14:56,573 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/security-groups' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/security-groups', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,575 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/security-groups (200, 10b) after 1 attempts +2025-07-09 02:14:56,575 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/subnet-id' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/subnet-id', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,577 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/subnet-id (200, 24b) after 1 attempts +2025-07-09 02:14:56,577 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/subnet-ipv4-cidr-block' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/subnet-ipv4-cidr-block', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,579 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/subnet-ipv4-cidr-block (200, 13b) after 1 attempts +2025-07-09 02:14:56,579 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/vpc-id' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/vpc-id', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,581 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/vpc-id (200, 21b) after 1 attempts +2025-07-09 02:14:56,581 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/vpc-ipv4-cidr-block' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/vpc-ipv4-cidr-block', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,583 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/vpc-ipv4-cidr-block (200, 13b) after 1 attempts +2025-07-09 02:14:56,583 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/vpc-ipv4-cidr-blocks' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/vpc-ipv4-cidr-blocks', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,585 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/network/interfaces/macs/0a:2d:ae:37:82:39/vpc-ipv4-cidr-blocks (200, 13b) after 1 attempts +2025-07-09 02:14:56,585 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/placement/' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/placement/', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,587 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/placement/ (200, 45b) after 1 attempts +2025-07-09 02:14:56,587 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/placement/availability-zone' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/placement/availability-zone', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,588 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/placement/availability-zone (200, 11b) after 1 attempts +2025-07-09 02:14:56,588 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/placement/availability-zone-id' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/placement/availability-zone-id', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,590 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/placement/availability-zone-id (200, 8b) after 1 attempts +2025-07-09 02:14:56,590 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/placement/region' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/placement/region', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,591 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/placement/region (200, 10b) after 1 attempts +2025-07-09 02:14:56,591 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/public-keys/' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/public-keys/', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,593 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/public-keys/ (200, 13b) after 1 attempts +2025-07-09 02:14:56,593 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/public-keys/0/openssh-key' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/public-keys/0/openssh-key', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,595 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/public-keys/0/openssh-key (200, 93b) after 1 attempts +2025-07-09 02:14:56,595 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/services/' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/services/', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,597 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/services/ (200, 16b) after 1 attempts +2025-07-09 02:14:56,597 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/services/domain' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/services/domain', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,599 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/services/domain (200, 13b) after 1 attempts +2025-07-09 02:14:56,599 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/services/partition' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/services/partition', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,601 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/services/partition (200, 3b) after 1 attempts +2025-07-09 02:14:56,601 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/ami-id' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/ami-id', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,603 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/ami-id (200, 21b) after 1 attempts +2025-07-09 02:14:56,603 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/ami-launch-index' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/ami-launch-index', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,605 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/ami-launch-index (200, 1b) after 1 attempts +2025-07-09 02:14:56,605 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/ami-manifest-path' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/ami-manifest-path', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,606 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/ami-manifest-path (200, 9b) after 1 attempts +2025-07-09 02:14:56,607 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/hostname' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/hostname', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,608 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/hostname (200, 43b) after 1 attempts +2025-07-09 02:14:56,608 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/instance-action' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/instance-action', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,610 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/instance-action (200, 4b) after 1 attempts +2025-07-09 02:14:56,610 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/instance-id' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/instance-id', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,611 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/instance-id (200, 19b) after 1 attempts +2025-07-09 02:14:56,611 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/instance-life-cycle' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/instance-life-cycle', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,613 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/instance-life-cycle (200, 9b) after 1 attempts +2025-07-09 02:14:56,613 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/instance-type' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/instance-type', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,616 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/instance-type (200, 8b) after 1 attempts +2025-07-09 02:14:56,616 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/local-hostname' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/local-hostname', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,618 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/local-hostname (200, 43b) after 1 attempts +2025-07-09 02:14:56,618 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/local-ipv4' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/local-ipv4', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,620 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/local-ipv4 (200, 12b) after 1 attempts +2025-07-09 02:14:56,620 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/mac' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/mac', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,622 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/mac (200, 17b) after 1 attempts +2025-07-09 02:14:56,622 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/profile' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/profile', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,623 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/profile (200, 11b) after 1 attempts +2025-07-09 02:14:56,624 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/public-hostname' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/public-hostname', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,625 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/public-hostname (200, 51b) after 1 attempts +2025-07-09 02:14:56,625 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/public-ipv4' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/public-ipv4', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,627 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/public-ipv4 (200, 14b) after 1 attempts +2025-07-09 02:14:56,627 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/reservation-id' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/reservation-id', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,628 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/reservation-id (200, 19b) after 1 attempts +2025-07-09 02:14:56,628 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/meta-data/security-groups' with {'url': 'http://169.254.169.254/2021-03-23/meta-data/security-groups', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,630 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/meta-data/security-groups (200, 10b) after 1 attempts +2025-07-09 02:14:56,630 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/dynamic/instance-identity' with {'url': 'http://169.254.169.254/2021-03-23/dynamic/instance-identity', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,632 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/dynamic/instance-identity (200, 32b) after 1 attempts +2025-07-09 02:14:56,632 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/dynamic/instance-identity/document' with {'url': 'http://169.254.169.254/2021-03-23/dynamic/instance-identity/document', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,633 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/dynamic/instance-identity/document (200, 478b) after 1 attempts +2025-07-09 02:14:56,634 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/dynamic/instance-identity/pkcs7' with {'url': 'http://169.254.169.254/2021-03-23/dynamic/instance-identity/pkcs7', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,635 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/dynamic/instance-identity/pkcs7 (200, 1171b) after 1 attempts +2025-07-09 02:14:56,635 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/dynamic/instance-identity/rsa2048' with {'url': 'http://169.254.169.254/2021-03-23/dynamic/instance-identity/rsa2048', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,637 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/dynamic/instance-identity/rsa2048 (200, 1495b) after 1 attempts +2025-07-09 02:14:56,637 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254/2021-03-23/dynamic/instance-identity/signature' with {'url': 'http://169.254.169.254/2021-03-23/dynamic/instance-identity/signature', 'stream': False, 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED', 'User-Agent': 'Cloud-Init/25.1.2-0ubuntu0~24.04.1'}} configuration +2025-07-09 02:14:56,638 - url_helper.py[DEBUG]: Read from http://169.254.169.254/2021-03-23/dynamic/instance-identity/signature (200, 174b) after 1 attempts +2025-07-09 02:14:56,639 - DataSourceEc2.py[DEBUG]: Crawled metadata service using link-local ipv6 +2025-07-09 02:14:56,639 - subp.py[DEBUG]: Running command ['ip', '-family', 'inet', 'link', 'set', 'dev', 'enX0', 'down'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:56,640 - subp.py[DEBUG]: Running command ['ip', '-family', 'inet', 'addr', 'del', '172.31.7.189/20', 'dev', 'enX0'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:56,642 - util.py[DEBUG]: Writing to /var/lib/cloud/instance/obj.pkl - wb: [400] 13367 bytes +2025-07-09 02:14:56,645 - util.py[DEBUG]: Writing to /run/cloud-init/cloud-id-aws - wb: [644] 4 bytes +2025-07-09 02:14:56,645 - util.py[DEBUG]: Creating symbolic link from '/run/cloud-init/cloud-id' => '/run/cloud-init/cloud-id-aws' +2025-07-09 02:14:56,646 - atomic_helper.py[DEBUG]: Atomically writing to file /run/cloud-init/instance-data-sensitive.json (via temporary file /run/cloud-init/tmpdyt8dvst) - w: [600] 14690 bytes/chars +2025-07-09 02:14:56,646 - atomic_helper.py[DEBUG]: Atomically writing to file /run/cloud-init/instance-data.json (via temporary file /run/cloud-init/tmpnrjx09m2) - w: [644] 8135 bytes/chars +2025-07-09 02:14:56,646 - performance.py[DEBUG]: Getting metadata took 1.789 seconds +2025-07-09 02:14:56,646 - handlers.py[DEBUG]: finish: init-local/search-Ec2Local: SUCCESS: found local data from DataSourceEc2Local +2025-07-09 02:14:56,646 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/instance +2025-07-09 02:14:56,646 - stages.py[INFO]: Loaded datasource DataSourceEc2Local - DataSourceEc2Local +2025-07-09 02:14:56,647 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg (quiet=False) +2025-07-09 02:14:56,647 - util.py[DEBUG]: Reading 3718 bytes from /etc/cloud/cloud.cfg +2025-07-09 02:14:56,647 - util.py[DEBUG]: Attempting to load yaml from string of length 3718 with allowed root types (,) +2025-07-09 02:14:56,653 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/90_dpkg.cfg (quiet=False) +2025-07-09 02:14:56,654 - util.py[DEBUG]: Reading 343 bytes from /etc/cloud/cloud.cfg.d/90_dpkg.cfg +2025-07-09 02:14:56,654 - util.py[DEBUG]: Attempting to load yaml from string of length 343 with allowed root types (,) +2025-07-09 02:14:56,655 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/90-cpc-grub.cfg (quiet=False) +2025-07-09 02:14:56,655 - util.py[DEBUG]: Reading 108 bytes from /etc/cloud/cloud.cfg.d/90-cpc-grub.cfg +2025-07-09 02:14:56,655 - util.py[DEBUG]: Attempting to load yaml from string of length 108 with allowed root types (,) +2025-07-09 02:14:56,655 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/05_logging.cfg (quiet=False) +2025-07-09 02:14:56,655 - util.py[DEBUG]: Reading 2071 bytes from /etc/cloud/cloud.cfg.d/05_logging.cfg +2025-07-09 02:14:56,655 - util.py[DEBUG]: Attempting to load yaml from string of length 2071 with allowed root types (,) +2025-07-09 02:14:56,658 - util.py[DEBUG]: Reading from /run/cloud-init/cloud.cfg (quiet=False) +2025-07-09 02:14:56,658 - util.py[DEBUG]: Reading 31 bytes from /run/cloud-init/cloud.cfg +2025-07-09 02:14:56,658 - util.py[DEBUG]: Attempting to load yaml from string of length 31 with allowed root types (,) +2025-07-09 02:14:56,658 - util.py[DEBUG]: Attempting to load yaml from string of length 0 with allowed root types (,) +2025-07-09 02:14:56,658 - util.py[DEBUG]: loaded blob returned None, returning default. +2025-07-09 02:14:56,658 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/instance +2025-07-09 02:14:56,658 - util.py[DEBUG]: Creating symbolic link from '/var/lib/cloud/instance' => '/var/lib/cloud/instances/i-09d847c70054b933d' +2025-07-09 02:14:56,659 - util.py[DEBUG]: Reading from /var/lib/cloud/instances/i-09d847c70054b933d/datasource (quiet=False) +2025-07-09 02:14:56,659 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/datasource - wb: [644] 39 bytes +2025-07-09 02:14:56,659 - util.py[DEBUG]: Writing to /var/lib/cloud/data/previous-datasource - wb: [644] 39 bytes +2025-07-09 02:14:56,660 - util.py[DEBUG]: Reading from /var/lib/cloud/data/instance-id (quiet=False) +2025-07-09 02:14:56,660 - util.py[DEBUG]: Reading 20 bytes from /var/lib/cloud/data/instance-id +2025-07-09 02:14:56,661 - stages.py[DEBUG]: previous iid found to be i-030e2be3c2aa415a3 +2025-07-09 02:14:56,661 - util.py[DEBUG]: Writing to /var/lib/cloud/data/instance-id - wb: [644] 20 bytes +2025-07-09 02:14:56,661 - util.py[DEBUG]: Writing to /run/cloud-init/.instance-id - wb: [644] 20 bytes +2025-07-09 02:14:56,661 - util.py[DEBUG]: Writing to /var/lib/cloud/data/previous-instance-id - wb: [644] 20 bytes +2025-07-09 02:14:56,661 - util.py[DEBUG]: Writing to /var/lib/cloud/instance/obj.pkl - wb: [400] 13418 bytes +2025-07-09 02:14:56,662 - main.py[DEBUG]: [local] init will now be targeting instance id: i-09d847c70054b933d. new=True +2025-07-09 02:14:56,662 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg (quiet=False) +2025-07-09 02:14:56,662 - util.py[DEBUG]: Reading 3718 bytes from /etc/cloud/cloud.cfg +2025-07-09 02:14:56,662 - util.py[DEBUG]: Attempting to load yaml from string of length 3718 with allowed root types (,) +2025-07-09 02:14:56,669 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/90_dpkg.cfg (quiet=False) +2025-07-09 02:14:56,669 - util.py[DEBUG]: Reading 343 bytes from /etc/cloud/cloud.cfg.d/90_dpkg.cfg +2025-07-09 02:14:56,669 - util.py[DEBUG]: Attempting to load yaml from string of length 343 with allowed root types (,) +2025-07-09 02:14:56,670 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/90-cpc-grub.cfg (quiet=False) +2025-07-09 02:14:56,670 - util.py[DEBUG]: Reading 108 bytes from /etc/cloud/cloud.cfg.d/90-cpc-grub.cfg +2025-07-09 02:14:56,670 - util.py[DEBUG]: Attempting to load yaml from string of length 108 with allowed root types (,) +2025-07-09 02:14:56,670 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/05_logging.cfg (quiet=False) +2025-07-09 02:14:56,670 - util.py[DEBUG]: Reading 2071 bytes from /etc/cloud/cloud.cfg.d/05_logging.cfg +2025-07-09 02:14:56,670 - util.py[DEBUG]: Attempting to load yaml from string of length 2071 with allowed root types (,) +2025-07-09 02:14:56,672 - util.py[DEBUG]: Reading from /run/cloud-init/cloud.cfg (quiet=False) +2025-07-09 02:14:56,672 - util.py[DEBUG]: Reading 31 bytes from /run/cloud-init/cloud.cfg +2025-07-09 02:14:56,672 - util.py[DEBUG]: Attempting to load yaml from string of length 31 with allowed root types (,) +2025-07-09 02:14:56,672 - util.py[DEBUG]: Attempting to load yaml from string of length 0 with allowed root types (,) +2025-07-09 02:14:56,672 - util.py[DEBUG]: loaded blob returned None, returning default. +2025-07-09 02:14:56,672 - stages.py[DEBUG]: Using distro class +2025-07-09 02:14:56,673 - util.py[DEBUG]: Reading from /var/lib/cloud/data/set-hostname (quiet=False) +2025-07-09 02:14:56,674 - util.py[DEBUG]: Reading 91 bytes from /var/lib/cloud/data/set-hostname +2025-07-09 02:14:56,674 - cc_set_hostname.py[DEBUG]: Setting the hostname to ip-172-31-7-189.ap-south-1.compute.internal (ip-172-31-7-189) +2025-07-09 02:14:56,674 - util.py[DEBUG]: Reading from /etc/hostname (quiet=False) +2025-07-09 02:14:56,674 - util.py[DEBUG]: Reading 16 bytes from /etc/hostname +2025-07-09 02:14:56,674 - util.py[DEBUG]: Writing to /etc/hostname - wb: [644] 16 bytes +2025-07-09 02:14:56,674 - distros[DEBUG]: Non-persistently setting the system hostname to ip-172-31-7-189 +2025-07-09 02:14:56,674 - subp.py[DEBUG]: Running command ['hostname', 'ip-172-31-7-189'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:56,677 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/data/set-hostname (via temporary file /var/lib/cloud/data/tmp5ibxe7yr) - w: [644] 91 bytes/chars +2025-07-09 02:14:56,677 - util.py[DEBUG]: Reading from /sys/class/net/lo/address (quiet=False) +2025-07-09 02:14:56,678 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/lo/address +2025-07-09 02:14:56,678 - util.py[DEBUG]: Reading from /sys/class/net/enX0/address (quiet=False) +2025-07-09 02:14:56,678 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/enX0/address +2025-07-09 02:14:56,678 - util.py[DEBUG]: Reading from /sys/class/net/enX0/name_assign_type (quiet=False) +2025-07-09 02:14:56,678 - util.py[DEBUG]: Reading 2 bytes from /sys/class/net/enX0/name_assign_type +2025-07-09 02:14:56,678 - util.py[DEBUG]: Reading from /sys/class/net/lo/address (quiet=False) +2025-07-09 02:14:56,678 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/lo/address +2025-07-09 02:14:56,678 - util.py[DEBUG]: Reading from /sys/class/net/lo/device/device (quiet=False) +2025-07-09 02:14:56,678 - util.py[DEBUG]: Reading from /sys/class/net/enX0/address (quiet=False) +2025-07-09 02:14:56,678 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/enX0/address +2025-07-09 02:14:56,678 - util.py[DEBUG]: Reading from /sys/class/net/enX0/device/device (quiet=False) +2025-07-09 02:14:56,678 - util.py[DEBUG]: Reading from /sys/class/net/enX0/carrier (quiet=False) +2025-07-09 02:14:56,678 - net[DEBUG]: Interface has no carrier: enX0 +2025-07-09 02:14:56,678 - util.py[DEBUG]: Reading from /sys/class/net/enX0/dormant (quiet=False) +2025-07-09 02:14:56,678 - util.py[DEBUG]: Reading from /sys/class/net/enX0/operstate (quiet=False) +2025-07-09 02:14:56,678 - util.py[DEBUG]: Reading 5 bytes from /sys/class/net/enX0/operstate +2025-07-09 02:14:56,678 - util.py[DEBUG]: Reading from /sys/class/net/lo/addr_assign_type (quiet=False) +2025-07-09 02:14:56,678 - util.py[DEBUG]: Reading 2 bytes from /sys/class/net/lo/addr_assign_type +2025-07-09 02:14:56,679 - util.py[DEBUG]: Reading from /sys/class/net/lo/uevent (quiet=False) +2025-07-09 02:14:56,679 - util.py[DEBUG]: Reading 23 bytes from /sys/class/net/lo/uevent +2025-07-09 02:14:56,679 - util.py[DEBUG]: Reading from /sys/class/net/lo/address (quiet=False) +2025-07-09 02:14:56,679 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/lo/address +2025-07-09 02:14:56,679 - net[DEBUG]: ovs-vsctl not in PATH; not detecting Open vSwitch interfaces +2025-07-09 02:14:56,680 - util.py[DEBUG]: Reading from /sys/class/net/lo/device/device (quiet=False) +2025-07-09 02:14:56,680 - util.py[DEBUG]: Reading from /sys/class/net/enX0/addr_assign_type (quiet=False) +2025-07-09 02:14:56,680 - util.py[DEBUG]: Reading 2 bytes from /sys/class/net/enX0/addr_assign_type +2025-07-09 02:14:56,680 - util.py[DEBUG]: Reading from /sys/class/net/enX0/uevent (quiet=False) +2025-07-09 02:14:56,680 - util.py[DEBUG]: Reading 25 bytes from /sys/class/net/enX0/uevent +2025-07-09 02:14:56,680 - util.py[DEBUG]: Reading from /sys/class/net/enX0/address (quiet=False) +2025-07-09 02:14:56,680 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/enX0/address +2025-07-09 02:14:56,680 - util.py[DEBUG]: Reading from /sys/class/net/enX0/device/device (quiet=False) +2025-07-09 02:14:56,680 - util.py[DEBUG]: Reading from /sys/class/net/lo/type (quiet=False) +2025-07-09 02:14:56,680 - util.py[DEBUG]: Reading 4 bytes from /sys/class/net/lo/type +2025-07-09 02:14:56,680 - util.py[DEBUG]: Reading from /sys/class/net/enX0/type (quiet=False) +2025-07-09 02:14:56,680 - util.py[DEBUG]: Reading 2 bytes from /sys/class/net/enX0/type +2025-07-09 02:14:56,682 - distros[DEBUG]: Selected renderer 'netplan' from priority list: ['netplan', 'eni', 'sysconfig'] +2025-07-09 02:14:56,682 - util.py[DEBUG]: Reading from /sys/class/net/lo/address (quiet=False) +2025-07-09 02:14:56,682 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/lo/address +2025-07-09 02:14:56,682 - util.py[DEBUG]: Reading from /sys/class/net/enX0/address (quiet=False) +2025-07-09 02:14:56,682 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/enX0/address +2025-07-09 02:14:56,683 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/instance/network-config.json (via temporary file /var/lib/cloud/instance/tmpnrvy8j7a) - w: [600] 171 bytes/chars +2025-07-09 02:14:56,683 - util.py[DEBUG]: Creating symbolic link from '/run/cloud-init/network-config.json' => '/var/lib/cloud/instance/network-config.json' +2025-07-09 02:14:56,683 - util.py[DEBUG]: Reading from /usr/lib/python3/dist-packages/cloudinit/config/schemas/schema-network-config-v2.json (quiet=False) +2025-07-09 02:14:56,685 - util.py[DEBUG]: Reading 17906 bytes from /usr/lib/python3/dist-packages/cloudinit/config/schemas/schema-network-config-v2.json +2025-07-09 02:14:56,685 - schema.py[DEBUG]: Validating network-config with netplan API +2025-07-09 02:14:56,685 - util.py[DEBUG]: Writing to /run/cloud-init/tmp/tmpmy83xaiy/etc/netplan/network-config.yaml - wb: [600] 202 bytes +2025-07-09 02:14:56,686 - util.py[DEBUG]: Reading from /sys/class/net/enX0/device/device (quiet=False) +2025-07-09 02:14:56,686 - util.py[DEBUG]: Reading from /sys/class/net/lo/addr_assign_type (quiet=False) +2025-07-09 02:14:56,686 - util.py[DEBUG]: Reading 2 bytes from /sys/class/net/lo/addr_assign_type +2025-07-09 02:14:56,686 - util.py[DEBUG]: Reading from /sys/class/net/lo/uevent (quiet=False) +2025-07-09 02:14:56,686 - util.py[DEBUG]: Reading 23 bytes from /sys/class/net/lo/uevent +2025-07-09 02:14:56,686 - util.py[DEBUG]: Reading from /sys/class/net/lo/address (quiet=False) +2025-07-09 02:14:56,686 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/lo/address +2025-07-09 02:14:56,687 - util.py[DEBUG]: Reading from /sys/class/net/lo/device/device (quiet=False) +2025-07-09 02:14:56,687 - util.py[DEBUG]: Reading from /sys/class/net/enX0/addr_assign_type (quiet=False) +2025-07-09 02:14:56,687 - util.py[DEBUG]: Reading 2 bytes from /sys/class/net/enX0/addr_assign_type +2025-07-09 02:14:56,687 - util.py[DEBUG]: Reading from /sys/class/net/enX0/uevent (quiet=False) +2025-07-09 02:14:56,687 - util.py[DEBUG]: Reading 25 bytes from /sys/class/net/enX0/uevent +2025-07-09 02:14:56,687 - util.py[DEBUG]: Reading from /sys/class/net/enX0/address (quiet=False) +2025-07-09 02:14:56,687 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/enX0/address +2025-07-09 02:14:56,687 - util.py[DEBUG]: Reading from /sys/class/net/enX0/device/device (quiet=False) +2025-07-09 02:14:56,687 - util.py[DEBUG]: Reading from /sys/class/net/lo/type (quiet=False) +2025-07-09 02:14:56,687 - util.py[DEBUG]: Reading 4 bytes from /sys/class/net/lo/type +2025-07-09 02:14:56,687 - util.py[DEBUG]: Reading from /sys/class/net/enX0/type (quiet=False) +2025-07-09 02:14:56,687 - util.py[DEBUG]: Reading 2 bytes from /sys/class/net/enX0/type +2025-07-09 02:14:56,687 - networking.py[DEBUG]: net: all expected physical devices present +2025-07-09 02:14:56,687 - stages.py[DEBUG]: applying net config names for {'version': 2, 'ethernets': {'enX0': {'dhcp4': True, 'dhcp6': False, 'match': {'macaddress': '0a:2d:ae:37:82:39'}, 'set-name': 'enX0'}}} +2025-07-09 02:14:56,687 - util.py[DEBUG]: Reading from /sys/class/net/enX0/device/device (quiet=False) +2025-07-09 02:14:56,687 - util.py[DEBUG]: Reading from /sys/class/net/lo/addr_assign_type (quiet=False) +2025-07-09 02:14:56,688 - util.py[DEBUG]: Reading 2 bytes from /sys/class/net/lo/addr_assign_type +2025-07-09 02:14:56,688 - util.py[DEBUG]: Reading from /sys/class/net/lo/uevent (quiet=False) +2025-07-09 02:14:56,688 - util.py[DEBUG]: Reading 23 bytes from /sys/class/net/lo/uevent +2025-07-09 02:14:56,688 - util.py[DEBUG]: Reading from /sys/class/net/lo/address (quiet=False) +2025-07-09 02:14:56,688 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/lo/address +2025-07-09 02:14:56,688 - util.py[DEBUG]: Reading from /sys/class/net/lo/device/device (quiet=False) +2025-07-09 02:14:56,688 - util.py[DEBUG]: Reading from /sys/class/net/enX0/addr_assign_type (quiet=False) +2025-07-09 02:14:56,688 - util.py[DEBUG]: Reading 2 bytes from /sys/class/net/enX0/addr_assign_type +2025-07-09 02:14:56,688 - util.py[DEBUG]: Reading from /sys/class/net/enX0/uevent (quiet=False) +2025-07-09 02:14:56,688 - util.py[DEBUG]: Reading 25 bytes from /sys/class/net/enX0/uevent +2025-07-09 02:14:56,688 - util.py[DEBUG]: Reading from /sys/class/net/enX0/address (quiet=False) +2025-07-09 02:14:56,688 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/enX0/address +2025-07-09 02:14:56,688 - util.py[DEBUG]: Reading from /sys/class/net/enX0/device/device (quiet=False) +2025-07-09 02:14:56,688 - util.py[DEBUG]: Reading from /sys/class/net/lo/operstate (quiet=False) +2025-07-09 02:14:56,688 - util.py[DEBUG]: Reading 8 bytes from /sys/class/net/lo/operstate +2025-07-09 02:14:56,688 - util.py[DEBUG]: Reading from /sys/class/net/enX0/operstate (quiet=False) +2025-07-09 02:14:56,688 - util.py[DEBUG]: Reading 5 bytes from /sys/class/net/enX0/operstate +2025-07-09 02:14:56,689 - subp.py[DEBUG]: Running command ['ip', '-6', 'addr', 'show', 'permanent', 'scope', 'global'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:56,691 - subp.py[DEBUG]: Running command ['ip', '-4', 'addr', 'show'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:56,693 - net[DEBUG]: Detected interfaces {'lo': {'downable': False, 'device_id': None, 'driver': None, 'mac': '00:00:00:00:00:00', 'name': 'lo', 'up': True}, 'enX0': {'downable': True, 'device_id': None, 'driver': 'vif', 'mac': '0a:2d:ae:37:82:39', 'name': 'enX0', 'up': False}} +2025-07-09 02:14:56,693 - net[DEBUG]: no work necessary for renaming of [['0a:2d:ae:37:82:39', 'enX0', 'vif', None]] +2025-07-09 02:14:56,693 - stages.py[INFO]: Applying network configuration from ds bringup=False: {'version': 2, 'ethernets': {'enX0': {'dhcp4': True, 'dhcp6': False, 'match': {'macaddress': '0a:2d:ae:37:82:39'}, 'set-name': 'enX0'}}} +2025-07-09 02:14:56,693 - util.py[DEBUG]: Writing to /run/cloud-init/sem/apply_network_config.once - wb: [644] 24 bytes +2025-07-09 02:14:56,693 - distros[DEBUG]: Selected renderer 'netplan' from priority list: ['netplan', 'eni', 'sysconfig'] +2025-07-09 02:14:56,694 - network_state.py[DEBUG]: Passthrough netplan v2 config +2025-07-09 02:14:56,695 - netplan.py[DEBUG]: V2 to V2 passthrough +2025-07-09 02:14:56,696 - util.py[DEBUG]: Reading from /etc/netplan/50-cloud-init.yaml (quiet=False) +2025-07-09 02:14:56,696 - util.py[DEBUG]: Reading 158 bytes from /etc/netplan/50-cloud-init.yaml +2025-07-09 02:14:56,696 - util.py[DEBUG]: Attempting to load yaml from string of length 158 with allowed root types (,) +2025-07-09 02:14:56,697 - util.py[DEBUG]: Attempting to load yaml from string of length 506 with allowed root types (,) +2025-07-09 02:14:56,698 - netplan.py[DEBUG]: Rendered netplan config using netplan python API +2025-07-09 02:14:56,698 - subp.py[DEBUG]: Running command ['netplan', 'generate'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:57,238 - performance.py[DEBUG]: Running ['netplan', 'generate'] took 0.540 seconds +2025-07-09 02:14:57,238 - subp.py[DEBUG]: Running command ['udevadm', 'test-builtin', 'net_setup_link', '/sys/class/net/lo'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:57,243 - subp.py[DEBUG]: Running command ['udevadm', 'test-builtin', 'net_setup_link', '/sys/class/net/enX0'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:57,246 - distros[DEBUG]: Not bringing up newly configured network interfaces +2025-07-09 02:14:57,246 - main.py[DEBUG]: [local] Exiting. datasource DataSourceEc2Local not in local mode. +2025-07-09 02:14:57,247 - util.py[DEBUG]: Reading from /proc/uptime (quiet=False) +2025-07-09 02:14:57,247 - util.py[DEBUG]: Reading 10 bytes from /proc/uptime +2025-07-09 02:14:57,247 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/data/status.json (via temporary file /var/lib/cloud/data/tmp93vjkphs) - w: [644] 499 bytes/chars +2025-07-09 02:14:57,247 - performance.py[DEBUG]: cloud-init stage: 'init-local' took 2.462 seconds +2025-07-09 02:14:57,247 - handlers.py[DEBUG]: finish: init-local: SUCCESS: searching for local datasources +2025-07-09 02:14:59,281 - log_util.py[DEBUG]: Cloud-init v. 25.1.2-0ubuntu0~24.04.1 running 'init' at Wed, 09 Jul 2025 02:14:59 +0000. Up 10.35 seconds. +2025-07-09 02:14:59,284 - main.py[INFO]: PID [1] started cloud-init 'init'. +2025-07-09 02:14:59,284 - main.py[DEBUG]: No kernel command line url found. +2025-07-09 02:14:59,284 - main.py[DEBUG]: Closing stdin +2025-07-09 02:14:59,285 - util.py[DEBUG]: Writing to /var/log/cloud-init.log - ab: [640] 0 bytes +2025-07-09 02:14:59,285 - util.py[DEBUG]: Changing the ownership of /var/log/cloud-init.log to 102:4 +2025-07-09 02:14:59,285 - util.py[DEBUG]: Reading from /var/lib/cloud/data/python-version (quiet=False) +2025-07-09 02:14:59,285 - util.py[DEBUG]: Reading 4 bytes from /var/lib/cloud/data/python-version +2025-07-09 02:14:59,285 - subp.py[DEBUG]: Running command ['ip', '--json', 'addr'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:59,287 - subp.py[DEBUG]: Running command ['ip', '-o', 'route', 'list'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:59,288 - subp.py[DEBUG]: Running command ['ip', '--oneline', '-6', 'route', 'list', 'table', 'all'] with allowed return codes [0, 1] (shell=False, capture=True) +2025-07-09 02:14:59,292 - handlers.py[DEBUG]: start: init-network/check-cache: attempting to read from cache [trust] +2025-07-09 02:14:59,292 - util.py[DEBUG]: Reading from /var/lib/cloud/instance/obj.pkl (quiet=False) +2025-07-09 02:14:59,292 - util.py[DEBUG]: Reading 13418 bytes from /var/lib/cloud/instance/obj.pkl +2025-07-09 02:14:59,335 - util.py[DEBUG]: Reading from /run/cloud-init/.instance-id (quiet=False) +2025-07-09 02:14:59,335 - util.py[DEBUG]: Reading 20 bytes from /run/cloud-init/.instance-id +2025-07-09 02:14:59,335 - stages.py[DEBUG]: restored from cache with run check: DataSourceEc2Local +2025-07-09 02:14:59,335 - handlers.py[DEBUG]: finish: init-network/check-cache: SUCCESS: restored from cache with run check: DataSourceEc2Local +2025-07-09 02:14:59,335 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg (quiet=False) +2025-07-09 02:14:59,335 - util.py[DEBUG]: Reading 3718 bytes from /etc/cloud/cloud.cfg +2025-07-09 02:14:59,335 - util.py[DEBUG]: Attempting to load yaml from string of length 3718 with allowed root types (,) +2025-07-09 02:14:59,340 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/90_dpkg.cfg (quiet=False) +2025-07-09 02:14:59,340 - util.py[DEBUG]: Reading 343 bytes from /etc/cloud/cloud.cfg.d/90_dpkg.cfg +2025-07-09 02:14:59,340 - util.py[DEBUG]: Attempting to load yaml from string of length 343 with allowed root types (,) +2025-07-09 02:14:59,341 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/90-cpc-grub.cfg (quiet=False) +2025-07-09 02:14:59,341 - util.py[DEBUG]: Reading 108 bytes from /etc/cloud/cloud.cfg.d/90-cpc-grub.cfg +2025-07-09 02:14:59,341 - util.py[DEBUG]: Attempting to load yaml from string of length 108 with allowed root types (,) +2025-07-09 02:14:59,342 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/05_logging.cfg (quiet=False) +2025-07-09 02:14:59,342 - util.py[DEBUG]: Reading 2071 bytes from /etc/cloud/cloud.cfg.d/05_logging.cfg +2025-07-09 02:14:59,342 - util.py[DEBUG]: Attempting to load yaml from string of length 2071 with allowed root types (,) +2025-07-09 02:14:59,343 - util.py[DEBUG]: Reading from /run/cloud-init/cloud.cfg (quiet=False) +2025-07-09 02:14:59,343 - util.py[DEBUG]: Reading 31 bytes from /run/cloud-init/cloud.cfg +2025-07-09 02:14:59,343 - util.py[DEBUG]: Attempting to load yaml from string of length 31 with allowed root types (,) +2025-07-09 02:14:59,343 - util.py[DEBUG]: Attempting to load yaml from string of length 0 with allowed root types (,) +2025-07-09 02:14:59,343 - util.py[DEBUG]: loaded blob returned None, returning default. +2025-07-09 02:14:59,344 - stages.py[INFO]: Instance link already exists, not recreating it. +2025-07-09 02:14:59,344 - util.py[DEBUG]: Reading from /var/lib/cloud/instances/i-09d847c70054b933d/datasource (quiet=False) +2025-07-09 02:14:59,344 - util.py[DEBUG]: Reading 39 bytes from /var/lib/cloud/instances/i-09d847c70054b933d/datasource +2025-07-09 02:14:59,344 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/datasource - wb: [644] 39 bytes +2025-07-09 02:14:59,345 - util.py[DEBUG]: Writing to /var/lib/cloud/data/previous-datasource - wb: [644] 39 bytes +2025-07-09 02:14:59,345 - util.py[DEBUG]: Reading from /var/lib/cloud/data/instance-id (quiet=False) +2025-07-09 02:14:59,345 - util.py[DEBUG]: Reading 20 bytes from /var/lib/cloud/data/instance-id +2025-07-09 02:14:59,345 - stages.py[DEBUG]: previous iid found to be i-09d847c70054b933d +2025-07-09 02:14:59,345 - util.py[DEBUG]: Writing to /var/lib/cloud/data/instance-id - wb: [644] 20 bytes +2025-07-09 02:14:59,345 - util.py[DEBUG]: Writing to /run/cloud-init/.instance-id - wb: [644] 20 bytes +2025-07-09 02:14:59,345 - util.py[DEBUG]: Writing to /var/lib/cloud/data/previous-instance-id - wb: [644] 20 bytes +2025-07-09 02:14:59,346 - util.py[DEBUG]: Writing to /var/lib/cloud/instance/obj.pkl - wb: [400] 13604 bytes +2025-07-09 02:14:59,346 - stages.py[INFO]: Not re-loading configuration, instance id and datasource have not changed. +2025-07-09 02:14:59,346 - main.py[DEBUG]: [net] init will now be targeting instance id: i-09d847c70054b933d. new=False +2025-07-09 02:14:59,347 - util.py[DEBUG]: Reading from /sys/class/net/lo/address (quiet=False) +2025-07-09 02:14:59,347 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/lo/address +2025-07-09 02:14:59,347 - util.py[DEBUG]: Reading from /sys/class/net/enX0/address (quiet=False) +2025-07-09 02:14:59,347 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/enX0/address +2025-07-09 02:14:59,347 - util.py[DEBUG]: Reading from /sys/class/net/lo/addr_assign_type (quiet=False) +2025-07-09 02:14:59,347 - util.py[DEBUG]: Reading 2 bytes from /sys/class/net/lo/addr_assign_type +2025-07-09 02:14:59,347 - util.py[DEBUG]: Reading from /sys/class/net/lo/uevent (quiet=False) +2025-07-09 02:14:59,347 - util.py[DEBUG]: Reading 23 bytes from /sys/class/net/lo/uevent +2025-07-09 02:14:59,347 - util.py[DEBUG]: Reading from /sys/class/net/lo/address (quiet=False) +2025-07-09 02:14:59,347 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/lo/address +2025-07-09 02:14:59,348 - net[DEBUG]: ovs-vsctl not in PATH; not detecting Open vSwitch interfaces +2025-07-09 02:14:59,348 - util.py[DEBUG]: Reading from /sys/class/net/lo/device/device (quiet=False) +2025-07-09 02:14:59,348 - util.py[DEBUG]: Reading from /sys/class/net/enX0/addr_assign_type (quiet=False) +2025-07-09 02:14:59,348 - util.py[DEBUG]: Reading 2 bytes from /sys/class/net/enX0/addr_assign_type +2025-07-09 02:14:59,348 - util.py[DEBUG]: Reading from /sys/class/net/enX0/uevent (quiet=False) +2025-07-09 02:14:59,348 - util.py[DEBUG]: Reading 25 bytes from /sys/class/net/enX0/uevent +2025-07-09 02:14:59,348 - util.py[DEBUG]: Reading from /sys/class/net/enX0/address (quiet=False) +2025-07-09 02:14:59,348 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/enX0/address +2025-07-09 02:14:59,348 - util.py[DEBUG]: Reading from /sys/class/net/enX0/device/device (quiet=False) +2025-07-09 02:14:59,348 - util.py[DEBUG]: Reading from /sys/class/net/lo/type (quiet=False) +2025-07-09 02:14:59,348 - util.py[DEBUG]: Reading 4 bytes from /sys/class/net/lo/type +2025-07-09 02:14:59,348 - util.py[DEBUG]: Reading from /sys/class/net/enX0/type (quiet=False) +2025-07-09 02:14:59,348 - util.py[DEBUG]: Reading 2 bytes from /sys/class/net/enX0/type +2025-07-09 02:14:59,348 - distros[DEBUG]: Selected renderer 'netplan' from priority list: ['netplan', 'eni', 'sysconfig'] +2025-07-09 02:14:59,349 - util.py[DEBUG]: Reading from /var/lib/cloud/hotplug.enabled (quiet=False) +2025-07-09 02:14:59,349 - util.py[DEBUG]: File not found: /var/lib/cloud/hotplug.enabled +2025-07-09 02:14:59,349 - stages.py[DEBUG]: Allowed events: {: {, }} +2025-07-09 02:14:59,349 - stages.py[DEBUG]: Event Denied: scopes=['network'] EventType=boot-legacy +2025-07-09 02:14:59,349 - stages.py[DEBUG]: No network config applied. Neither a new instance nor datasource network update allowed +2025-07-09 02:14:59,349 - stages.py[DEBUG]: applying net config names for {'version': 2, 'ethernets': {'enX0': {'dhcp4': True, 'dhcp6': False, 'match': {'macaddress': '0a:2d:ae:37:82:39'}, 'set-name': 'enX0'}}} +2025-07-09 02:14:59,349 - stages.py[DEBUG]: Using distro class +2025-07-09 02:14:59,349 - util.py[DEBUG]: Reading from /sys/class/net/enX0/device/device (quiet=False) +2025-07-09 02:14:59,349 - util.py[DEBUG]: Reading from /sys/class/net/lo/addr_assign_type (quiet=False) +2025-07-09 02:14:59,349 - util.py[DEBUG]: Reading 2 bytes from /sys/class/net/lo/addr_assign_type +2025-07-09 02:14:59,349 - util.py[DEBUG]: Reading from /sys/class/net/lo/uevent (quiet=False) +2025-07-09 02:14:59,349 - util.py[DEBUG]: Reading 23 bytes from /sys/class/net/lo/uevent +2025-07-09 02:14:59,349 - util.py[DEBUG]: Reading from /sys/class/net/lo/address (quiet=False) +2025-07-09 02:14:59,349 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/lo/address +2025-07-09 02:14:59,349 - util.py[DEBUG]: Reading from /sys/class/net/lo/device/device (quiet=False) +2025-07-09 02:14:59,349 - util.py[DEBUG]: Reading from /sys/class/net/enX0/addr_assign_type (quiet=False) +2025-07-09 02:14:59,350 - util.py[DEBUG]: Reading 2 bytes from /sys/class/net/enX0/addr_assign_type +2025-07-09 02:14:59,350 - util.py[DEBUG]: Reading from /sys/class/net/enX0/uevent (quiet=False) +2025-07-09 02:14:59,350 - util.py[DEBUG]: Reading 25 bytes from /sys/class/net/enX0/uevent +2025-07-09 02:14:59,350 - util.py[DEBUG]: Reading from /sys/class/net/enX0/address (quiet=False) +2025-07-09 02:14:59,350 - util.py[DEBUG]: Reading 18 bytes from /sys/class/net/enX0/address +2025-07-09 02:14:59,350 - util.py[DEBUG]: Reading from /sys/class/net/enX0/device/device (quiet=False) +2025-07-09 02:14:59,350 - util.py[DEBUG]: Reading from /sys/class/net/lo/operstate (quiet=False) +2025-07-09 02:14:59,350 - util.py[DEBUG]: Reading 8 bytes from /sys/class/net/lo/operstate +2025-07-09 02:14:59,350 - util.py[DEBUG]: Reading from /sys/class/net/enX0/operstate (quiet=False) +2025-07-09 02:14:59,350 - util.py[DEBUG]: Reading 3 bytes from /sys/class/net/enX0/operstate +2025-07-09 02:14:59,350 - subp.py[DEBUG]: Running command ['ip', '-6', 'addr', 'show', 'permanent', 'scope', 'global'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:59,351 - subp.py[DEBUG]: Running command ['ip', '-4', 'addr', 'show'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:59,353 - net[DEBUG]: Detected interfaces {'lo': {'downable': False, 'device_id': None, 'driver': None, 'mac': '00:00:00:00:00:00', 'name': 'lo', 'up': True}, 'enX0': {'downable': False, 'device_id': None, 'driver': 'vif', 'mac': '0a:2d:ae:37:82:39', 'name': 'enX0', 'up': True}} +2025-07-09 02:14:59,353 - net[DEBUG]: no work necessary for renaming of [['0a:2d:ae:37:82:39', 'enX0', 'vif', None]] +2025-07-09 02:14:59,353 - handlers.py[DEBUG]: start: init-network/setup-datasource: setting up datasource +2025-07-09 02:14:59,353 - handlers.py[DEBUG]: finish: init-network/setup-datasource: SUCCESS: setting up datasource +2025-07-09 02:14:59,353 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/user-data.txt - wb: [600] 985 bytes +2025-07-09 02:14:59,355 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/user-data.txt.i - wb: [600] 1291 bytes +2025-07-09 02:14:59,355 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/vendor-data.txt - wb: [600] 0 bytes +2025-07-09 02:14:59,355 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/vendor-data.txt.i - wb: [600] 308 bytes +2025-07-09 02:14:59,356 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/vendor-data2.txt - wb: [600] 0 bytes +2025-07-09 02:14:59,356 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/vendor-data2.txt.i - wb: [600] 308 bytes +2025-07-09 02:14:59,357 - util.py[DEBUG]: Reading from /var/lib/cloud/data/set-hostname (quiet=False) +2025-07-09 02:14:59,357 - util.py[DEBUG]: Reading 91 bytes from /var/lib/cloud/data/set-hostname +2025-07-09 02:14:59,357 - cc_set_hostname.py[DEBUG]: No hostname changes. Skipping set_hostname +2025-07-09 02:14:59,357 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/sem/consume_data - wb: [644] 22 bytes +2025-07-09 02:14:59,357 - helpers.py[DEBUG]: Running consume_data using lock () +2025-07-09 02:14:59,357 - handlers.py[DEBUG]: start: init-network/consume-user-data: reading and applying user-data +2025-07-09 02:14:59,357 - launch_index.py[DEBUG]: Discarding 0 multipart messages which do not match launch index 0 +2025-07-09 02:14:59,359 - stages.py[DEBUG]: Added default handler for {'text/cloud-config-jsonp', 'text/cloud-config'} from CloudConfigPartHandler: [['text/cloud-config', 'text/cloud-config-jsonp']] +2025-07-09 02:14:59,359 - stages.py[DEBUG]: Added default handler for {'text/x-shellscript'} from ShellScriptPartHandler: [['text/x-shellscript']] +2025-07-09 02:14:59,359 - stages.py[DEBUG]: Added default handler for {'text/x-shellscript-per-boot'} from ShellScriptByFreqPartHandler: [['text/x-shellscript-per-boot']] +2025-07-09 02:14:59,359 - stages.py[DEBUG]: Added default handler for {'text/x-shellscript-per-instance'} from ShellScriptByFreqPartHandler: [['text/x-shellscript-per-instance']] +2025-07-09 02:14:59,359 - stages.py[DEBUG]: Added default handler for {'text/x-shellscript-per-once'} from ShellScriptByFreqPartHandler: [['text/x-shellscript-per-once']] +2025-07-09 02:14:59,359 - stages.py[DEBUG]: Added default handler for {'text/cloud-boothook'} from BootHookPartHandler: [['text/cloud-boothook']] +2025-07-09 02:14:59,359 - stages.py[DEBUG]: Added default handler for {'text/jinja2'} from JinjaTemplatePartHandler: [['text/jinja2']] +2025-07-09 02:14:59,359 - handlers[DEBUG]: Calling handler CloudConfigPartHandler: [['text/cloud-config', 'text/cloud-config-jsonp']] (__begin__, None, 3) with frequency once-per-instance +2025-07-09 02:14:59,359 - handlers[DEBUG]: Calling handler ShellScriptPartHandler: [['text/x-shellscript']] (__begin__, None, 2) with frequency once-per-instance +2025-07-09 02:14:59,359 - handlers[DEBUG]: Calling handler ShellScriptByFreqPartHandler: [['text/x-shellscript-per-boot']] (__begin__, None, 2) with frequency once-per-instance +2025-07-09 02:14:59,359 - handlers[DEBUG]: Calling handler ShellScriptByFreqPartHandler: [['text/x-shellscript-per-instance']] (__begin__, None, 2) with frequency once-per-instance +2025-07-09 02:14:59,359 - handlers[DEBUG]: Calling handler ShellScriptByFreqPartHandler: [['text/x-shellscript-per-once']] (__begin__, None, 2) with frequency once-per-instance +2025-07-09 02:14:59,359 - handlers[DEBUG]: Calling handler BootHookPartHandler: [['text/cloud-boothook']] (__begin__, None, 2) with frequency once-per-instance +2025-07-09 02:14:59,359 - handlers[DEBUG]: Calling handler JinjaTemplatePartHandler: [['text/jinja2']] (__begin__, None, 3) with frequency once-per-instance +2025-07-09 02:14:59,359 - handlers[DEBUG]: {'MIME-Version': '1.0', 'Content-Type': 'text/x-shellscript', 'Content-Disposition': 'attachment; filename="part-001"'} +2025-07-09 02:14:59,359 - handlers[DEBUG]: Calling handler ShellScriptPartHandler: [['text/x-shellscript']] (text/x-shellscript, part-001, 2) with frequency once-per-instance +2025-07-09 02:14:59,359 - util.py[DEBUG]: Writing to /var/lib/cloud/instance/scripts/part-001 - wb: [700] 985 bytes +2025-07-09 02:14:59,359 - handlers[DEBUG]: Calling handler CloudConfigPartHandler: [['text/cloud-config', 'text/cloud-config-jsonp']] (__end__, None, 3) with frequency once-per-instance +2025-07-09 02:14:59,360 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/cloud-config.txt - wb: [600] 0 bytes +2025-07-09 02:14:59,360 - handlers[DEBUG]: Calling handler ShellScriptPartHandler: [['text/x-shellscript']] (__end__, None, 2) with frequency once-per-instance +2025-07-09 02:14:59,360 - handlers[DEBUG]: Calling handler ShellScriptByFreqPartHandler: [['text/x-shellscript-per-boot']] (__end__, None, 2) with frequency once-per-instance +2025-07-09 02:14:59,360 - handlers[DEBUG]: Calling handler ShellScriptByFreqPartHandler: [['text/x-shellscript-per-instance']] (__end__, None, 2) with frequency once-per-instance +2025-07-09 02:14:59,360 - handlers[DEBUG]: Calling handler ShellScriptByFreqPartHandler: [['text/x-shellscript-per-once']] (__end__, None, 2) with frequency once-per-instance +2025-07-09 02:14:59,360 - handlers[DEBUG]: Calling handler BootHookPartHandler: [['text/cloud-boothook']] (__end__, None, 2) with frequency once-per-instance +2025-07-09 02:14:59,360 - handlers[DEBUG]: Calling handler JinjaTemplatePartHandler: [['text/jinja2']] (__end__, None, 3) with frequency once-per-instance +2025-07-09 02:14:59,360 - handlers.py[DEBUG]: finish: init-network/consume-user-data: SUCCESS: reading and applying user-data +2025-07-09 02:14:59,360 - handlers.py[DEBUG]: start: init-network/consume-vendor-data: reading and applying vendor-data +2025-07-09 02:14:59,360 - stages.py[DEBUG]: no vendordata from datasource +2025-07-09 02:14:59,360 - handlers.py[DEBUG]: finish: init-network/consume-vendor-data: SUCCESS: reading and applying vendor-data +2025-07-09 02:14:59,360 - handlers.py[DEBUG]: start: init-network/consume-vendor-data2: reading and applying vendor-data2 +2025-07-09 02:14:59,360 - stages.py[DEBUG]: no vendordata2 from datasource +2025-07-09 02:14:59,360 - handlers.py[DEBUG]: finish: init-network/consume-vendor-data2: SUCCESS: reading and applying vendor-data2 +2025-07-09 02:14:59,360 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg (quiet=False) +2025-07-09 02:14:59,360 - util.py[DEBUG]: Reading 3718 bytes from /etc/cloud/cloud.cfg +2025-07-09 02:14:59,360 - util.py[DEBUG]: Attempting to load yaml from string of length 3718 with allowed root types (,) +2025-07-09 02:14:59,365 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/90_dpkg.cfg (quiet=False) +2025-07-09 02:14:59,366 - util.py[DEBUG]: Reading 343 bytes from /etc/cloud/cloud.cfg.d/90_dpkg.cfg +2025-07-09 02:14:59,366 - util.py[DEBUG]: Attempting to load yaml from string of length 343 with allowed root types (,) +2025-07-09 02:14:59,366 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/90-cpc-grub.cfg (quiet=False) +2025-07-09 02:14:59,366 - util.py[DEBUG]: Reading 108 bytes from /etc/cloud/cloud.cfg.d/90-cpc-grub.cfg +2025-07-09 02:14:59,367 - util.py[DEBUG]: Attempting to load yaml from string of length 108 with allowed root types (,) +2025-07-09 02:14:59,367 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/05_logging.cfg (quiet=False) +2025-07-09 02:14:59,367 - util.py[DEBUG]: Reading 2071 bytes from /etc/cloud/cloud.cfg.d/05_logging.cfg +2025-07-09 02:14:59,367 - util.py[DEBUG]: Attempting to load yaml from string of length 2071 with allowed root types (,) +2025-07-09 02:14:59,368 - util.py[DEBUG]: Reading from /run/cloud-init/cloud.cfg (quiet=False) +2025-07-09 02:14:59,368 - util.py[DEBUG]: Reading 31 bytes from /run/cloud-init/cloud.cfg +2025-07-09 02:14:59,368 - util.py[DEBUG]: Attempting to load yaml from string of length 31 with allowed root types (,) +2025-07-09 02:14:59,368 - util.py[DEBUG]: Attempting to load yaml from string of length 0 with allowed root types (,) +2025-07-09 02:14:59,369 - util.py[DEBUG]: loaded blob returned None, returning default. +2025-07-09 02:14:59,369 - util.py[DEBUG]: Reading from /var/lib/cloud/instance/cloud-config.txt (quiet=False) +2025-07-09 02:14:59,369 - util.py[DEBUG]: Reading 0 bytes from /var/lib/cloud/instance/cloud-config.txt +2025-07-09 02:14:59,369 - util.py[DEBUG]: Attempting to load yaml from string of length 0 with allowed root types (,) +2025-07-09 02:14:59,369 - util.py[DEBUG]: loaded blob returned None, returning default. +2025-07-09 02:14:59,369 - atomic_helper.py[DEBUG]: Atomically writing to file /run/cloud-init/combined-cloud-config.json (via temporary file /run/cloud-init/tmpfk3usnmk) - w: [600] 5609 bytes/chars +2025-07-09 02:14:59,370 - util.py[DEBUG]: Reading from /run/cloud-init/instance-data-sensitive.json (quiet=False) +2025-07-09 02:14:59,370 - util.py[DEBUG]: Reading 14690 bytes from /run/cloud-init/instance-data-sensitive.json +2025-07-09 02:14:59,370 - atomic_helper.py[DEBUG]: Atomically writing to file /run/cloud-init/instance-data-sensitive.json (via temporary file /run/cloud-init/tmpipns2bhf) - w: [600] 16921 bytes/chars +2025-07-09 02:14:59,370 - main.py[DEBUG]: Skipping user-data validation. No user-data found. +2025-07-09 02:14:59,371 - util.py[DEBUG]: Reading from /var/lib/cloud/instance/cloud-config.txt (quiet=False) +2025-07-09 02:14:59,371 - util.py[DEBUG]: Reading 0 bytes from /var/lib/cloud/instance/cloud-config.txt +2025-07-09 02:14:59,371 - util.py[DEBUG]: Attempting to load yaml from string of length 0 with allowed root types (,) +2025-07-09 02:14:59,371 - util.py[DEBUG]: loaded blob returned None, returning default. +2025-07-09 02:14:59,372 - handlers.py[DEBUG]: start: init-network/activate-datasource: activating datasource +2025-07-09 02:14:59,372 - util.py[DEBUG]: Writing to /var/lib/cloud/instance/obj.pkl - wb: [400] 16993 bytes +2025-07-09 02:14:59,373 - handlers.py[DEBUG]: finish: init-network/activate-datasource: SUCCESS: activating datasource +2025-07-09 02:14:59,373 - main.py[DEBUG]: no di_report found in config. +2025-07-09 02:14:59,390 - stages.py[DEBUG]: Using distro class +2025-07-09 02:14:59,391 - modules.py[INFO]: Skipping modules 'bootcmd,write_files,disk_setup,update_etc_hosts,ca_certs,rsyslog' because no applicable config is provided. +2025-07-09 02:14:59,391 - modules.py[DEBUG]: Running module seed_random () with frequency once-per-instance +2025-07-09 02:14:59,391 - handlers.py[DEBUG]: start: init-network/config-seed_random: running config-seed_random with frequency once-per-instance +2025-07-09 02:14:59,391 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/sem/config_seed_random - wb: [644] 24 bytes +2025-07-09 02:14:59,392 - helpers.py[DEBUG]: Running config-seed_random using lock () +2025-07-09 02:14:59,392 - cc_seed_random.py[DEBUG]: no command provided +2025-07-09 02:14:59,392 - handlers.py[DEBUG]: finish: init-network/config-seed_random: SUCCESS: config-seed_random ran successfully and took 0.000 seconds +2025-07-09 02:14:59,392 - modules.py[DEBUG]: Running module growpart () with frequency always +2025-07-09 02:14:59,392 - handlers.py[DEBUG]: start: init-network/config-growpart: running config-growpart with frequency always +2025-07-09 02:14:59,392 - helpers.py[DEBUG]: Running config-growpart using lock () +2025-07-09 02:14:59,392 - cc_growpart.py[DEBUG]: No 'growpart' entry in cfg. Using default: {'mode': 'auto', 'devices': ['/'], 'ignore_growroot_disabled': False} +2025-07-09 02:14:59,392 - subp.py[DEBUG]: Running command ['growpart', '--help'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:59,395 - util.py[DEBUG]: Reading from /proc/508/mountinfo (quiet=False) +2025-07-09 02:14:59,395 - util.py[DEBUG]: Reading 2555 bytes from /proc/508/mountinfo +2025-07-09 02:14:59,395 - cc_growpart.py[DEBUG]: growpart found fs=ext4 +2025-07-09 02:14:59,396 - util.py[DEBUG]: Reading from /sys/class/block/xvda1/partition (quiet=False) +2025-07-09 02:14:59,396 - util.py[DEBUG]: Reading 2 bytes from /sys/class/block/xvda1/partition +2025-07-09 02:14:59,396 - util.py[DEBUG]: Reading from /sys/devices/vbd-768/block/xvda/dev (quiet=False) +2025-07-09 02:14:59,396 - util.py[DEBUG]: Reading 6 bytes from /sys/devices/vbd-768/block/xvda/dev +2025-07-09 02:14:59,396 - util.py[DEBUG]: Reading from /proc/508/mountinfo (quiet=False) +2025-07-09 02:14:59,396 - util.py[DEBUG]: Reading 2555 bytes from /proc/508/mountinfo +2025-07-09 02:14:59,396 - util.py[DEBUG]: Reading from /proc/508/mountinfo (quiet=False) +2025-07-09 02:14:59,396 - util.py[DEBUG]: Reading 2555 bytes from /proc/508/mountinfo +2025-07-09 02:14:59,397 - subp.py[DEBUG]: Running command ['growpart', '--dry-run', '/dev/xvda', '1'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:59,515 - performance.py[DEBUG]: Running ['growpart', '--dry-run', '/dev/xvda', '1'] took 0.118 seconds +2025-07-09 02:14:59,516 - performance.py[DEBUG]: Resizing devices took 0.121 seconds +2025-07-09 02:14:59,516 - cc_growpart.py[DEBUG]: '/' NOCHANGE: no change necessary (/dev/xvda, 1) +2025-07-09 02:14:59,516 - handlers.py[DEBUG]: finish: init-network/config-growpart: SUCCESS: config-growpart ran successfully and took 0.124 seconds +2025-07-09 02:14:59,516 - modules.py[DEBUG]: Running module resizefs () with frequency always +2025-07-09 02:14:59,516 - handlers.py[DEBUG]: start: init-network/config-resizefs: running config-resizefs with frequency always +2025-07-09 02:14:59,517 - helpers.py[DEBUG]: Running config-resizefs using lock () +2025-07-09 02:14:59,517 - util.py[DEBUG]: Reading from /proc/508/mountinfo (quiet=False) +2025-07-09 02:14:59,517 - util.py[DEBUG]: Reading 2555 bytes from /proc/508/mountinfo +2025-07-09 02:14:59,517 - cc_resizefs.py[DEBUG]: resize_info: dev=/dev/root mnt_point=/ path=/ +2025-07-09 02:14:59,517 - cc_resizefs.py[DEBUG]: Resizing / (ext4) using resize2fs /dev/root +2025-07-09 02:14:59,517 - subp.py[DEBUG]: Running command ('resize2fs', '/dev/root') with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:59,528 - performance.py[DEBUG]: Running ('resize2fs', '/dev/root') took 0.011 seconds +2025-07-09 02:14:59,528 - cc_resizefs.py[DEBUG]: Resized root filesystem (type=ext4, val=True) +2025-07-09 02:14:59,528 - handlers.py[DEBUG]: finish: init-network/config-resizefs: SUCCESS: config-resizefs ran successfully and took 0.011 seconds +2025-07-09 02:14:59,528 - modules.py[DEBUG]: Running module mounts () with frequency once-per-instance +2025-07-09 02:14:59,528 - handlers.py[DEBUG]: start: init-network/config-mounts: running config-mounts with frequency once-per-instance +2025-07-09 02:14:59,528 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/sem/config_mounts - wb: [644] 24 bytes +2025-07-09 02:14:59,528 - helpers.py[DEBUG]: Running config-mounts using lock () +2025-07-09 02:14:59,528 - cc_mounts.py[DEBUG]: mounts configuration is [] +2025-07-09 02:14:59,529 - util.py[DEBUG]: Reading from /etc/fstab (quiet=False) +2025-07-09 02:14:59,529 - util.py[DEBUG]: Reading 146 bytes from /etc/fstab +2025-07-09 02:14:59,529 - cc_mounts.py[DEBUG]: Attempting to determine the real name of ephemeral0 +2025-07-09 02:14:59,529 - cc_mounts.py[DEBUG]: changed ephemeral0 => None +2025-07-09 02:14:59,529 - cc_mounts.py[DEBUG]: Ignoring nonexistent default named mount ephemeral0 +2025-07-09 02:14:59,529 - cc_mounts.py[DEBUG]: Attempting to determine the real name of swap +2025-07-09 02:14:59,529 - DataSourceEc2.py[DEBUG]: Unable to convert swap to a device +2025-07-09 02:14:59,529 - cc_mounts.py[DEBUG]: changed swap => None +2025-07-09 02:14:59,529 - cc_mounts.py[DEBUG]: Ignoring nonexistent default named mount swap +2025-07-09 02:14:59,529 - cc_mounts.py[DEBUG]: no need to setup swap +2025-07-09 02:14:59,529 - cc_mounts.py[DEBUG]: No modifications to fstab needed +2025-07-09 02:14:59,529 - handlers.py[DEBUG]: finish: init-network/config-mounts: SUCCESS: config-mounts ran successfully and took 0.001 seconds +2025-07-09 02:14:59,529 - modules.py[DEBUG]: Running module set_hostname () with frequency once-per-instance +2025-07-09 02:14:59,529 - handlers.py[DEBUG]: start: init-network/config-set_hostname: running config-set_hostname with frequency once-per-instance +2025-07-09 02:14:59,529 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/sem/config_set_hostname - wb: [644] 24 bytes +2025-07-09 02:14:59,530 - helpers.py[DEBUG]: Running config-set_hostname using lock () +2025-07-09 02:14:59,530 - util.py[DEBUG]: Reading from /var/lib/cloud/data/set-hostname (quiet=False) +2025-07-09 02:14:59,530 - util.py[DEBUG]: Reading 91 bytes from /var/lib/cloud/data/set-hostname +2025-07-09 02:14:59,530 - cc_set_hostname.py[DEBUG]: No hostname changes. Skipping set_hostname +2025-07-09 02:14:59,530 - handlers.py[DEBUG]: finish: init-network/config-set_hostname: SUCCESS: config-set_hostname ran successfully and took 0.001 seconds +2025-07-09 02:14:59,530 - modules.py[DEBUG]: Running module update_hostname () with frequency always +2025-07-09 02:14:59,530 - handlers.py[DEBUG]: start: init-network/config-update_hostname: running config-update_hostname with frequency always +2025-07-09 02:14:59,530 - helpers.py[DEBUG]: Running config-update_hostname using lock () +2025-07-09 02:14:59,530 - cc_update_hostname.py[DEBUG]: Updating hostname to ip-172-31-7-189.ap-south-1.compute.internal (ip-172-31-7-189) +2025-07-09 02:14:59,530 - util.py[DEBUG]: Reading from /var/lib/cloud/data/previous-hostname (quiet=False) +2025-07-09 02:14:59,531 - util.py[DEBUG]: Reading 16 bytes from /var/lib/cloud/data/previous-hostname +2025-07-09 02:14:59,531 - util.py[DEBUG]: Reading from /etc/hostname (quiet=False) +2025-07-09 02:14:59,531 - util.py[DEBUG]: Reading 16 bytes from /etc/hostname +2025-07-09 02:14:59,531 - distros[INFO]: /var/lib/cloud/data/previous-hostname differs from /etc/hostname, assuming user maintained hostname. +2025-07-09 02:14:59,531 - handlers.py[DEBUG]: finish: init-network/config-update_hostname: SUCCESS: config-update_hostname ran successfully and took 0.001 seconds +2025-07-09 02:14:59,531 - modules.py[DEBUG]: Running module users_groups () with frequency once-per-instance +2025-07-09 02:14:59,531 - handlers.py[DEBUG]: start: init-network/config-users_groups: running config-users_groups with frequency once-per-instance +2025-07-09 02:14:59,532 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/sem/config_users_groups - wb: [644] 23 bytes +2025-07-09 02:14:59,532 - helpers.py[DEBUG]: Running config-users_groups using lock () +2025-07-09 02:14:59,532 - distros[INFO]: User ubuntu already exists, skipping. +2025-07-09 02:14:59,532 - util.py[DEBUG]: Reading from /etc/os-release (quiet=True) +2025-07-09 02:14:59,532 - util.py[DEBUG]: Reading 400 bytes from /etc/os-release +2025-07-09 02:14:59,532 - util.py[DEBUG]: Reading from /etc/system-image/channel.ini (quiet=True) +2025-07-09 02:14:59,533 - util.py[DEBUG]: Reading 0 bytes from /etc/system-image/channel.ini +2025-07-09 02:14:59,533 - util.py[DEBUG]: Reading from /etc/shadow (quiet=False) +2025-07-09 02:14:59,533 - util.py[DEBUG]: Reading 899 bytes from /etc/shadow +2025-07-09 02:14:59,533 - distros[DEBUG]: User ubuntu found in /etc/shadow. Checking for empty password +2025-07-09 02:14:59,534 - subp.py[DEBUG]: Running command ['passwd', '-l', 'ubuntu'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:14:59,558 - performance.py[DEBUG]: Running ['passwd', '-l', 'ubuntu'] took 0.024 seconds +2025-07-09 02:14:59,558 - util.py[DEBUG]: Reading from /etc/sudoers (quiet=False) +2025-07-09 02:14:59,558 - util.py[DEBUG]: Reading 1800 bytes from /etc/sudoers +2025-07-09 02:14:59,560 - util.py[DEBUG]: Reading from /etc/sudoers.d/90-cloud-init-users (quiet=False) +2025-07-09 02:14:59,560 - util.py[DEBUG]: Reading 141 bytes from /etc/sudoers.d/90-cloud-init-users +2025-07-09 02:14:59,560 - handlers.py[DEBUG]: finish: init-network/config-users_groups: SUCCESS: config-users_groups ran successfully and took 0.029 seconds +2025-07-09 02:14:59,560 - modules.py[DEBUG]: Running module ssh () with frequency once-per-instance +2025-07-09 02:14:59,560 - handlers.py[DEBUG]: start: init-network/config-ssh: running config-ssh with frequency once-per-instance +2025-07-09 02:14:59,560 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/sem/config_ssh - wb: [644] 23 bytes +2025-07-09 02:14:59,561 - helpers.py[DEBUG]: Running config-ssh using lock () +2025-07-09 02:14:59,561 - util.py[DEBUG]: Attempting to remove /etc/ssh/ssh_host_ecdsa_key +2025-07-09 02:14:59,561 - util.py[DEBUG]: Attempting to remove /etc/ssh/ssh_host_ed25519_key +2025-07-09 02:14:59,562 - util.py[DEBUG]: Attempting to remove /etc/ssh/ssh_host_ed25519_key.pub +2025-07-09 02:14:59,562 - util.py[DEBUG]: Attempting to remove /etc/ssh/ssh_host_rsa_key.pub +2025-07-09 02:14:59,562 - util.py[DEBUG]: Attempting to remove /etc/ssh/ssh_host_rsa_key +2025-07-09 02:14:59,562 - util.py[DEBUG]: Attempting to remove /etc/ssh/ssh_host_ecdsa_key.pub +2025-07-09 02:14:59,562 - util.py[DEBUG]: Reading from /proc/sys/crypto/fips_enabled (quiet=False) +2025-07-09 02:14:59,562 - subp.py[DEBUG]: Running command ['ssh-keygen', '-t', 'rsa', '-N', '', '-f', '/etc/ssh/ssh_host_rsa_key'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:15:00,643 - performance.py[DEBUG]: Running ['ssh-keygen', '-t', 'rsa', '-N', '', '-f', '/etc/ssh/ssh_host_rsa_key'] took 1.081 seconds +2025-07-09 02:15:00,643 - subp.py[DEBUG]: Running command ['ssh-keygen', '-t', 'ecdsa', '-N', '', '-f', '/etc/ssh/ssh_host_ecdsa_key'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:15:00,649 - subp.py[DEBUG]: Running command ['ssh-keygen', '-t', 'ed25519', '-N', '', '-f', '/etc/ssh/ssh_host_ed25519_key'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:15:00,655 - util.py[DEBUG]: Reading from /etc/ssh/ssh_host_ed25519_key.pub (quiet=False) +2025-07-09 02:15:00,655 - util.py[DEBUG]: Reading 102 bytes from /etc/ssh/ssh_host_ed25519_key.pub +2025-07-09 02:15:00,655 - util.py[DEBUG]: Reading from /etc/ssh/ssh_host_rsa_key.pub (quiet=False) +2025-07-09 02:15:00,655 - util.py[DEBUG]: Reading 574 bytes from /etc/ssh/ssh_host_rsa_key.pub +2025-07-09 02:15:00,655 - util.py[DEBUG]: Reading from /etc/ssh/ssh_host_ecdsa_key.pub (quiet=False) +2025-07-09 02:15:00,655 - util.py[DEBUG]: Reading 182 bytes from /etc/ssh/ssh_host_ecdsa_key.pub +2025-07-09 02:15:00,656 - util.py[DEBUG]: Reading from /etc/ssh/sshd_config (quiet=False) +2025-07-09 02:15:00,656 - util.py[DEBUG]: Reading 3517 bytes from /etc/ssh/sshd_config +2025-07-09 02:15:00,658 - util.py[DEBUG]: Reading from /home/ubuntu/.ssh/authorized_keys (quiet=False) +2025-07-09 02:15:00,660 - util.py[DEBUG]: Reading 93 bytes from /home/ubuntu/.ssh/authorized_keys +2025-07-09 02:15:00,660 - util.py[DEBUG]: Writing to /home/ubuntu/.ssh/authorized_keys - wb: [600] 93 bytes +2025-07-09 02:15:00,661 - util.py[DEBUG]: Reading from /etc/ssh/sshd_config (quiet=False) +2025-07-09 02:15:00,661 - util.py[DEBUG]: Reading 3517 bytes from /etc/ssh/sshd_config +2025-07-09 02:15:00,661 - util.py[DEBUG]: Reading from /root/.ssh/authorized_keys (quiet=False) +2025-07-09 02:15:00,662 - util.py[DEBUG]: Reading 257 bytes from /root/.ssh/authorized_keys +2025-07-09 02:15:00,662 - util.py[DEBUG]: Writing to /root/.ssh/authorized_keys - wb: [600] 257 bytes +2025-07-09 02:15:00,662 - handlers.py[DEBUG]: finish: init-network/config-ssh: SUCCESS: config-ssh ran successfully and took 1.102 seconds +2025-07-09 02:15:00,663 - modules.py[DEBUG]: Running module set_passwords () with frequency once-per-instance +2025-07-09 02:15:00,663 - handlers.py[DEBUG]: start: init-network/config-set_passwords: running config-set_passwords with frequency once-per-instance +2025-07-09 02:15:00,663 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/sem/config_set_passwords - wb: [644] 24 bytes +2025-07-09 02:15:00,663 - helpers.py[DEBUG]: Running config-set_passwords using lock () +2025-07-09 02:15:00,663 - cc_set_passwords.py[DEBUG]: Leaving SSH config 'PasswordAuthentication' unchanged. ssh_pwauth=None +2025-07-09 02:15:00,663 - handlers.py[DEBUG]: finish: init-network/config-set_passwords: SUCCESS: config-set_passwords ran successfully and took 0.000 seconds +2025-07-09 02:15:00,663 - main.py[DEBUG]: Ran 9 modules with 0 failures +2025-07-09 02:15:00,663 - util.py[DEBUG]: Reading from /proc/uptime (quiet=False) +2025-07-09 02:15:00,663 - util.py[DEBUG]: Reading 11 bytes from /proc/uptime +2025-07-09 02:15:00,663 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/data/status.json (via temporary file /var/lib/cloud/data/tmpxzaj32p3) - w: [644] 501 bytes/chars +2025-07-09 02:15:00,664 - performance.py[DEBUG]: cloud-init stage: 'init-network' took 1.420 seconds +2025-07-09 02:15:00,664 - handlers.py[DEBUG]: finish: init-network: SUCCESS: searching for network datasources +2025-07-09 02:15:03,093 - log_util.py[DEBUG]: Cloud-init v. 25.1.2-0ubuntu0~24.04.1 running 'modules:config' at Wed, 09 Jul 2025 02:15:02 +0000. Up 14.02 seconds. +2025-07-09 02:15:03,093 - main.py[INFO]: PID [1] started cloud-init 'modules:config'. +2025-07-09 02:15:03,167 - stages.py[DEBUG]: Using distro class +2025-07-09 02:15:03,169 - modules.py[INFO]: Skipping modules 'wireguard,snap,ubuntu_autoinstall,keyboard,apt_pipelining,ubuntu_pro,ntp,timezone,disable_ec2_metadata,runcmd' because no applicable config is provided. +2025-07-09 02:15:03,169 - modules.py[DEBUG]: Running module ssh_import_id () with frequency once-per-instance +2025-07-09 02:15:03,169 - handlers.py[DEBUG]: start: modules-config/config-ssh_import_id: running config-ssh_import_id with frequency once-per-instance +2025-07-09 02:15:03,174 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/sem/config_ssh_import_id - wb: [644] 24 bytes +2025-07-09 02:15:03,174 - helpers.py[DEBUG]: Running config-ssh_import_id using lock () +2025-07-09 02:15:03,175 - cc_ssh_import_id.py[DEBUG]: Skipping module named ssh_import_id, no 'ssh_import_id' directives found. +2025-07-09 02:15:03,175 - handlers.py[DEBUG]: finish: modules-config/config-ssh_import_id: SUCCESS: config-ssh_import_id ran successfully and took 0.005 seconds +2025-07-09 02:15:03,175 - modules.py[DEBUG]: Running module locale () with frequency once-per-instance +2025-07-09 02:15:03,175 - handlers.py[DEBUG]: start: modules-config/config-locale: running config-locale with frequency once-per-instance +2025-07-09 02:15:03,175 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/sem/config_locale - wb: [644] 24 bytes +2025-07-09 02:15:03,175 - helpers.py[DEBUG]: Running config-locale using lock () +2025-07-09 02:15:03,175 - util.py[DEBUG]: Reading from /etc/default/locale (quiet=False) +2025-07-09 02:15:03,175 - util.py[DEBUG]: Reading 13 bytes from /etc/default/locale +2025-07-09 02:15:03,175 - cc_locale.py[DEBUG]: Setting locale to C.UTF-8 +2025-07-09 02:15:03,175 - debian.py[DEBUG]: System locale set to C.UTF-8 via /etc/default/locale +2025-07-09 02:15:03,175 - debian.py[DEBUG]: System has 'LANG=C.UTF-8' requested 'C.UTF-8', skipping regeneration. +2025-07-09 02:15:03,175 - handlers.py[DEBUG]: finish: modules-config/config-locale: SUCCESS: config-locale ran successfully and took 0.001 seconds +2025-07-09 02:15:03,176 - modules.py[DEBUG]: Running module grub_dpkg () with frequency once-per-instance +2025-07-09 02:15:03,176 - handlers.py[DEBUG]: start: modules-config/config-grub_dpkg: running config-grub_dpkg with frequency once-per-instance +2025-07-09 02:15:03,176 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/sem/config_grub_dpkg - wb: [644] 24 bytes +2025-07-09 02:15:03,176 - helpers.py[DEBUG]: Running config-grub_dpkg using lock () +2025-07-09 02:15:03,176 - cc_grub_dpkg.py[DEBUG]: grub_dpkg disabled by config grub_dpkg/enabled=False +2025-07-09 02:15:03,176 - handlers.py[DEBUG]: finish: modules-config/config-grub_dpkg: SUCCESS: config-grub_dpkg ran successfully and took 0.000 seconds +2025-07-09 02:15:03,176 - modules.py[DEBUG]: Running module apt_configure () with frequency once-per-instance +2025-07-09 02:15:03,176 - handlers.py[DEBUG]: start: modules-config/config-apt_configure: running config-apt_configure with frequency once-per-instance +2025-07-09 02:15:03,183 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/sem/config_apt_configure - wb: [644] 23 bytes +2025-07-09 02:15:03,183 - helpers.py[DEBUG]: Running config-apt_configure using lock () +2025-07-09 02:15:03,183 - cc_apt_configure.py[DEBUG]: debconf_selections was not set in config +2025-07-09 02:15:03,184 - util.py[DEBUG]: Reading from /etc/os-release (quiet=True) +2025-07-09 02:15:03,184 - util.py[DEBUG]: Reading 400 bytes from /etc/os-release +2025-07-09 02:15:03,184 - util.py[DEBUG]: Reading from /etc/system-image/channel.ini (quiet=True) +2025-07-09 02:15:03,184 - util.py[DEBUG]: Reading 0 bytes from /etc/system-image/channel.ini +2025-07-09 02:15:03,184 - cc_apt_configure.py[DEBUG]: handling apt config: {} +2025-07-09 02:15:03,184 - subp.py[DEBUG]: Running command ['lsb_release', '--all'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:15:03,231 - performance.py[DEBUG]: Running ['lsb_release', '--all'] took 0.047 seconds +2025-07-09 02:15:03,231 - subp.py[DEBUG]: Running command ['dpkg', '--print-architecture'] with allowed return codes [0] (shell=False, capture=True) +2025-07-09 02:15:03,273 - performance.py[DEBUG]: Running ['dpkg', '--print-architecture'] took 0.042 seconds +2025-07-09 02:15:03,273 - cc_apt_configure.py[DEBUG]: got primary mirror: None +2025-07-09 02:15:03,273 - cc_apt_configure.py[DEBUG]: got security mirror: None +2025-07-09 02:15:03,274 - util.py[DEBUG]: search for mirror in candidates: '['http://ap-south-1.ec2.archive.ubuntu.com/ubuntu/', 'http://ap-south-1b.clouds.archive.ubuntu.com/ubuntu/', 'http://ap-south-1.clouds.archive.ubuntu.com/ubuntu/']' +2025-07-09 02:15:03,296 - performance.py[DEBUG]: Resolving URL took 0.022 seconds +2025-07-09 02:15:03,296 - util.py[DEBUG]: found working mirror: 'http://ap-south-1.ec2.archive.ubuntu.com/ubuntu/' +2025-07-09 02:15:03,296 - util.py[DEBUG]: search for mirror in candidates: '[]' +2025-07-09 02:15:03,296 - distros[DEBUG]: filtered distro mirror info: {'primary': 'http://ap-south-1.ec2.archive.ubuntu.com/ubuntu/', 'security': 'http://security.ubuntu.com/ubuntu'} +2025-07-09 02:15:03,296 - cc_apt_configure.py[DEBUG]: Apt Mirror info: {'primary': 'http://ap-south-1.ec2.archive.ubuntu.com/ubuntu/', 'security': 'http://security.ubuntu.com/ubuntu', 'PRIMARY': 'http://ap-south-1.ec2.archive.ubuntu.com/ubuntu/', 'SECURITY': 'http://security.ubuntu.com/ubuntu', 'MIRROR': 'http://ap-south-1.ec2.archive.ubuntu.com/ubuntu/'} +2025-07-09 02:15:03,300 - cc_apt_configure.py[INFO]: No custom template provided, fall back to builtin +2025-07-09 02:15:03,301 - util.py[DEBUG]: Reading from /etc/cloud/templates/sources.list.ubuntu.deb822.tmpl (quiet=False) +2025-07-09 02:15:03,302 - util.py[DEBUG]: Reading 3091 bytes from /etc/cloud/templates/sources.list.ubuntu.deb822.tmpl +2025-07-09 02:15:03,323 - performance.py[DEBUG]: Rendering jinja2 template took 0.022 seconds +2025-07-09 02:15:03,324 - util.py[DEBUG]: Writing to /etc/apt/sources.list.d/ubuntu.sources - wb: [644] 3004 bytes +2025-07-09 02:15:03,328 - util.py[DEBUG]: Reading from /etc/apt/sources.list (quiet=False) +2025-07-09 02:15:03,335 - util.py[DEBUG]: Reading 270 bytes from /etc/apt/sources.list +2025-07-09 02:15:03,349 - handlers.py[DEBUG]: finish: modules-config/config-apt_configure: SUCCESS: config-apt_configure ran successfully and took 0.173 seconds +2025-07-09 02:15:03,349 - modules.py[DEBUG]: Running module byobu () with frequency once-per-instance +2025-07-09 02:15:03,350 - handlers.py[DEBUG]: start: modules-config/config-byobu: running config-byobu with frequency once-per-instance +2025-07-09 02:15:03,350 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/sem/config_byobu - wb: [644] 24 bytes +2025-07-09 02:15:03,350 - helpers.py[DEBUG]: Running config-byobu using lock () +2025-07-09 02:15:03,350 - cc_byobu.py[DEBUG]: Skipping module named byobu, no 'byobu' values found +2025-07-09 02:15:03,350 - handlers.py[DEBUG]: finish: modules-config/config-byobu: SUCCESS: config-byobu ran successfully and took 0.000 seconds +2025-07-09 02:15:03,350 - main.py[DEBUG]: Ran 5 modules with 0 failures +2025-07-09 02:15:03,350 - util.py[DEBUG]: Reading from /proc/uptime (quiet=False) +2025-07-09 02:15:03,355 - util.py[DEBUG]: Reading 11 bytes from /proc/uptime +2025-07-09 02:15:03,355 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/data/status.json (via temporary file /var/lib/cloud/data/tmp23w1i68l) - w: [644] 503 bytes/chars +2025-07-09 02:15:03,356 - performance.py[DEBUG]: cloud-init stage: 'modules-config' took 0.506 seconds +2025-07-09 02:15:03,356 - handlers.py[DEBUG]: finish: modules-config: SUCCESS: running modules for config +2025-07-09 02:15:05,922 - log_util.py[DEBUG]: Cloud-init v. 25.1.2-0ubuntu0~24.04.1 running 'modules:final' at Wed, 09 Jul 2025 02:15:05 +0000. Up 16.95 seconds. +2025-07-09 02:15:05,923 - main.py[INFO]: PID [1] started cloud-init 'modules:final'. +2025-07-09 02:15:05,966 - stages.py[DEBUG]: Using distro class +2025-07-09 02:15:05,968 - modules.py[INFO]: Skipping modules 'package_update_upgrade_install,fan,landscape,lxd,ubuntu_drivers,write_files_deferred,puppet,chef,ansible,mcollective,salt_minion,phone_home,power_state_change' because no applicable config is provided. +2025-07-09 02:15:05,968 - modules.py[DEBUG]: Running module reset_rmc () with frequency once-per-instance +2025-07-09 02:15:05,969 - handlers.py[DEBUG]: start: modules-final/config-reset_rmc: running config-reset_rmc with frequency once-per-instance +2025-07-09 02:15:05,969 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/sem/config_reset_rmc - wb: [644] 24 bytes +2025-07-09 02:15:05,969 - helpers.py[DEBUG]: Running config-reset_rmc using lock () +2025-07-09 02:15:05,972 - cc_reset_rmc.py[DEBUG]: module disabled, RSCT_PATH not present +2025-07-09 02:15:05,972 - handlers.py[DEBUG]: finish: modules-final/config-reset_rmc: SUCCESS: config-reset_rmc ran successfully and took 0.004 seconds +2025-07-09 02:15:05,972 - modules.py[DEBUG]: Running module scripts_vendor () with frequency once-per-instance +2025-07-09 02:15:05,972 - handlers.py[DEBUG]: start: modules-final/config-scripts_vendor: running config-scripts_vendor with frequency once-per-instance +2025-07-09 02:15:05,973 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/sem/config_scripts_vendor - wb: [644] 24 bytes +2025-07-09 02:15:05,973 - helpers.py[DEBUG]: Running config-scripts_vendor using lock () +2025-07-09 02:15:05,975 - handlers.py[DEBUG]: finish: modules-final/config-scripts_vendor: SUCCESS: config-scripts_vendor ran successfully and took 0.003 seconds +2025-07-09 02:15:05,975 - modules.py[DEBUG]: Running module scripts_per_once () with frequency once +2025-07-09 02:15:05,975 - handlers.py[DEBUG]: start: modules-final/config-scripts_per_once: running config-scripts_per_once with frequency once +2025-07-09 02:15:05,976 - helpers.py[DEBUG]: config-scripts_per_once already ran (freq=once) +2025-07-09 02:15:05,976 - handlers.py[DEBUG]: finish: modules-final/config-scripts_per_once: SUCCESS: config-scripts_per_once previously ran +2025-07-09 02:15:05,976 - modules.py[DEBUG]: Running module scripts_per_boot () with frequency always +2025-07-09 02:15:05,976 - handlers.py[DEBUG]: start: modules-final/config-scripts_per_boot: running config-scripts_per_boot with frequency always +2025-07-09 02:15:05,977 - helpers.py[DEBUG]: Running config-scripts_per_boot using lock () +2025-07-09 02:15:05,977 - handlers.py[DEBUG]: finish: modules-final/config-scripts_per_boot: SUCCESS: config-scripts_per_boot ran successfully and took 0.001 seconds +2025-07-09 02:15:05,977 - modules.py[DEBUG]: Running module scripts_per_instance () with frequency once-per-instance +2025-07-09 02:15:05,977 - handlers.py[DEBUG]: start: modules-final/config-scripts_per_instance: running config-scripts_per_instance with frequency once-per-instance +2025-07-09 02:15:05,977 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/sem/config_scripts_per_instance - wb: [644] 24 bytes +2025-07-09 02:15:05,978 - helpers.py[DEBUG]: Running config-scripts_per_instance using lock () +2025-07-09 02:15:05,980 - handlers.py[DEBUG]: finish: modules-final/config-scripts_per_instance: SUCCESS: config-scripts_per_instance ran successfully and took 0.003 seconds +2025-07-09 02:15:05,980 - modules.py[DEBUG]: Running module scripts_user () with frequency once-per-instance +2025-07-09 02:15:05,980 - handlers.py[DEBUG]: start: modules-final/config-scripts_user: running config-scripts_user with frequency once-per-instance +2025-07-09 02:15:05,981 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-09d847c70054b933d/sem/config_scripts_user - wb: [644] 24 bytes +2025-07-09 02:15:05,981 - helpers.py[DEBUG]: Running config-scripts_user using lock () +2025-07-09 02:15:05,981 - subp.py[DEBUG]: Running command ['/var/lib/cloud/instance/scripts/part-001'] with allowed return codes [0] (shell=False, capture=False) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index afee34e..b680a13 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -1,7 +1,5 @@ #!/bin/bash -set -e - # Check for environment argument if [ -z "$1" ]; then echo "[Error] Usage: $0 " @@ -26,18 +24,49 @@ terraform init echo "[+] Applying configuration for environment: $ENV" terraform apply -var-file="$CONFIG_FILE" -auto-approve -echo "[+] Waiting for app to deploy..." -sleep 180 +echo "[+] Waiting 200 seconds for app to deploy in ec2 instance" +sleep 200 # Get the public IP from Terraform output RAW_INSTANCE_IP=$(terraform output -raw instance_public_ip) +echo -e "\n" echo "[+] Testing app on http://$RAW_INSTANCE_IP:80" +echo -e "\n" + +echo -e "\n" curl "http://$RAW_INSTANCE_IP:80" +echo -e "\n" +echo -e "\n" echo "[+] Instance Public IP: $RAW_INSTANCE_IP" +echo "[+] Deploying Log Verification EC2 instance..." +terraform apply -var-file="$CONFIG_FILE" -target=aws_instance.log_verifier -auto-approve +VERIFIER_IP=$(terraform output -raw verifier_instance_public_ip) + + +echo "Verified Public IP: $VERIFIER_IP" + + +# #To verify and pull logs from ec2 to local. +# echo "Wait 2min for verifier ec2 (read only) to pull the logs from s3 to local environment" +# sleep 120 +# cd .. # to save logs at root level +# PRIVATE_KEY_PATH="/Users/default/CS/DevOps/AWS/ssh-key-ec2.pem" #change this to your ssh private key path, also make sure to use `chmod 400` on your key before using +# echo "trying to scp logs to local" +# scp -r -i "$PRIVATE_KEY_PATH" -o StrictHostKeyChecking=no ubuntu@$VERIFIER_IP:/mylogs/ . #to pull logs from readonly ec2 to your local directory /mylogs/ +# cd $TERRAFORM_DIR # to run destroy need to go to terraform directory + +echo -e "\n" +echo "[+] Using curl on app at http://$RAW_INSTANCE_IP:80" +echo -e "\n" +curl "http://$RAW_INSTANCE_IP:80" +echo -e "\n" +echo -e "\n" -# sleep 650 +echo "Terraform destroy will run after 2 minutes..." +echo "You can press ctrl+c and do it earlier as well" +sleep 120 -# terraform destroy -var-file="$CONFIG_FILE" -auto-approve \ No newline at end of file +terraform destroy -var-file="$CONFIG_FILE" -auto-approve diff --git a/scripts/dev_script.sh b/scripts/dev_script.sh index 1178ac9..91d78d5 100755 --- a/scripts/dev_script.sh +++ b/scripts/dev_script.sh @@ -1,14 +1,14 @@ #!/bin/bash -set -e + # Update system and install dependencies -apt-get update -y -apt-get install -y unzip curl git openjdk-21-jdk maven +# apt-get update -y +# apt-get install -y unzip git openjdk-21-jdk maven -# Install AWS CLI v2 -curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" -unzip awscliv2.zip -sudo ./aws/install +# # Install AWS CLI v2 +# curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" +# unzip awscliv2.zip +# sudo ./aws/install # Set JAVA_HOME @@ -26,12 +26,12 @@ mvn clean package # Run the Java app nohup java -jar target/*.jar --server.port=80 > /var/log/my-app.log 2>&1 & -# Wait for the app to start -sleep 30 +# Wait for app to run +sleep 5 # Upload Logs to S3 -aws s3 cp /var/log/cloud-init.log s3://${s3_bucket_name}/system/ -aws s3 cp /var/log/my-app.log s3://${s3_bucket_name}/app/ +sudo aws s3 cp /var/log/cloud-init.log s3://${s3_bucket_name}/dev/system/ +sudo aws s3 cp /var/log/my-app.log s3://${s3_bucket_name}/dev/app/ # Shutdown after timeout sudo shutdown -h +${shutdown_minutes} diff --git a/scripts/prod_script.sh b/scripts/prod_script.sh index 1178ac9..c726052 100755 --- a/scripts/prod_script.sh +++ b/scripts/prod_script.sh @@ -1,14 +1,13 @@ #!/bin/bash -set -e # Update system and install dependencies -apt-get update -y -apt-get install -y unzip curl git openjdk-21-jdk maven +# apt-get update -y +# apt-get install -y unzip git openjdk-21-jdk maven -# Install AWS CLI v2 -curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" -unzip awscliv2.zip -sudo ./aws/install +# # Install AWS CLI v2 +# curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" +# unzip awscliv2.zip +# sudo ./aws/install # Set JAVA_HOME @@ -27,11 +26,11 @@ mvn clean package nohup java -jar target/*.jar --server.port=80 > /var/log/my-app.log 2>&1 & # Wait for the app to start -sleep 30 +sleep 5 # Upload Logs to S3 -aws s3 cp /var/log/cloud-init.log s3://${s3_bucket_name}/system/ -aws s3 cp /var/log/my-app.log s3://${s3_bucket_name}/app/ +aws s3 cp /var/log/cloud-init.log s3://${s3_bucket_name}/prod/system/ +aws s3 cp /var/log/my-app.log s3://${s3_bucket_name}/prod/app/ # Shutdown after timeout sudo shutdown -h +${shutdown_minutes} diff --git a/scripts/verify_logs_script.sh b/scripts/verify_logs_script.sh new file mode 100644 index 0000000..756a8ff --- /dev/null +++ b/scripts/verify_logs_script.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +# Install AWS CLI and dependencies +# apt-get update -y +# apt-get install -y unzip curl + +# curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" +# unzip awscliv2.zip +# sudo ./aws/install + +# Create directories for logs +# cd /home/ubuntu +# mkdir -p /mylogs/app +# mkdir -p /mylogs/system +mkdir -p /mylogs + + + +# Retrieve logs from S3 +echo "Fetching logs from S3 Bucket: ${s3_bucket_name}" +# sudo aws s3 sync s3://techeazy-logs-dev-unique123ss /mylogs +# sudo aws s3 sync s3://${s3_bucket_name} /mylogs/ + +echo "Waiting for logs to appear in S3 bucket: ${s3_bucket_name}" +sleep 60 # Its taking approx 60 seconds for app to run and logs to be sent in s3 from another ec2 + +sudo aws s3 sync s3://${s3_bucket_name} /mylogs + +# MAX_RETRIES=20 +# RETRY_DELAY=30 # seconds + +# for ((i=1; i<=MAX_RETRIES; i++)); do +# echo "Attempt $i: Syncing logs from S3..." + +# if sudo aws s3 sync s3://${s3_bucket_name} /mylogs; then +# echo "S3 sync completed." + +# # Check if both /mylogs/app and /mylogs/system exist and are not empty +# if [ -d "/mylogs/app" ] && [ -n "$(ls -A /mylogs/app 2>/dev/null)" ] && \ +# [ -d "/mylogs/system" ] && [ -n "$(ls -A /mylogs/system 2>/dev/null)" ]; then +# echo "āœ… Both 'app' and 'system' logs found on attempt $i." +# break +# else +# echo "āš ļø One or both directories missing or empty. Retrying..." +# fi + +# else +# echo "āŒ S3 sync failed. Retrying..." +# fi + +# sleep $RETRY_DELAY +# done + + + + +# Final check if logs were synced +if [ "$(ls -A /mylogs/app 2>/dev/null)" ]; then + echo "Logs found and downloaded." +else + echo "ERROR: No logs found in /mylogs after $MAX_RETRIES attempts." >&2 + exit 1 +fi + + +# aws s3 cp s3://${s3_bucket_name}/system/ /mylogs/app/ --recursive +# aws s3 cp s3://${s3_bucket_name}/system/ /mylogs/system/ --recursive +# aws s3 cp s3://techeazy-logs-dev-unique123ss/app/ /mylogs/app/ --recursive + + +# Shutdown instance after fetching logs +echo "Verifier complete. Shutting down in ${fetch_timeout} minutes." +sudo shutdown -h +${fetch_timeout} \ No newline at end of file diff --git a/terraform/.terraform.lock.hcl b/terraform/.terraform.lock.hcl deleted file mode 100644 index 44dfbc7..0000000 --- a/terraform/.terraform.lock.hcl +++ /dev/null @@ -1,24 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/hashicorp/aws" { - version = "6.0.0" - hashes = [ - "h1:dbRRZ1NzH1QV/+83xT/X3MLYaZobMXt8DNwbqnJojpo=", - "zh:16b1bb786719b7ebcddba3ab751b976ebf4006f7144afeebcb83f0c5f41f8eb9", - "zh:1fbc08b817b9eaf45a2b72ccba59f4ea19e7fcf017be29f5a9552b623eccc5bc", - "zh:304f58f3333dbe846cfbdfc2227e6ed77041ceea33b6183972f3f8ab51bd065f", - "zh:4cd447b5c24f14553bd6e1a0e4fea3c7d7b218cbb2316a3d93f1c5cb562c181b", - "zh:589472b56be8277558616075fc5480fcd812ba6dc70e8979375fc6d8750f83ef", - "zh:5d78484ba43c26f1ef6067c4150550b06fd39c5d4bfb790f92c4a6f7d9d0201b", - "zh:5f470ce664bffb22ace736643d2abe7ad45858022b652143bcd02d71d38d4e42", - "zh:7a9cbb947aaab8c885096bce5da22838ca482196cf7d04ffb8bdf7fd28003e47", - "zh:854df3e4c50675e727705a0eaa4f8d42ccd7df6a5efa2456f0205a9901ace019", - "zh:87162c0f47b1260f5969679dccb246cb528f27f01229d02fd30a8e2f9869ba2c", - "zh:9a145404d506b52078cd7060e6cbb83f8fc7953f3f63a5e7137d41f69d6317a3", - "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", - "zh:a4eab2649f5afe06cc406ce2aaf9fd44dcf311123f48d344c255e93454c08921", - "zh:bea09141c6186a3e133413ae3a2e3d1aaf4f43466a6a468827287527edf21710", - "zh:d7ea2a35ff55ddfe639ab3b04331556b772a8698eca01f5d74151615d9f336db", - ] -} diff --git a/terraform/dev_config.tfvars b/terraform/dev_config.tfvars index 89708a6..4a134f9 100644 --- a/terraform/dev_config.tfvars +++ b/terraform/dev_config.tfvars @@ -1,7 +1,9 @@ -instance_type = "t2.micro" -key_name = "ssh-key-ec2" -stage = "Dev" -shutdown_minutes = 10 -s3_bucket_name = "techeazy-logs-dev-unique123ss" # Change this! -aws_region = "ap-south-1" -repo_url = "https://github.com/techeazy-consulting/techeazy-devops" +instance_type = "t2.micro" +key_name = "ssh-key-ec2" #change this to your key-pair name +# ami_id = "ami-0f918f7e67a3323f0" +stage = "dev" +shutdown_minutes = 30 +s3_bucket_name = "techeazy-logs-unique123ss" # Change this! +aws_region = "ap-south-1" +repo_url = "https://github.com/techeazy-consulting/techeazy-devops" +verifier_lifetime = 25 diff --git a/terraform/ec2.tf b/terraform/ec2.tf index b65cfde..b2ffb07 100644 --- a/terraform/ec2.tf +++ b/terraform/ec2.tf @@ -31,6 +31,7 @@ resource "aws_security_group" "web_sg" { } # EC2 Instance +# Application EC2 Instance resource "aws_instance" "app" { ami = var.ami_id instance_type = var.instance_type @@ -38,7 +39,6 @@ resource "aws_instance" "app" { vpc_security_group_ids = [aws_security_group.web_sg.id] iam_instance_profile = aws_iam_instance_profile.ec2_instance_profile_b.name - user_data = templatefile("${path.module}/../scripts/${lower(var.stage)}_script.sh", { s3_bucket_name = var.s3_bucket_name aws_region = var.aws_region @@ -51,3 +51,27 @@ resource "aws_instance" "app" { Stage = var.stage } } + +# Log Verifier EC2 Instance +resource "aws_instance" "log_verifier" { + ami = var.ami_id + instance_type = var.instance_type + key_name = var.key_name + vpc_security_group_ids = [aws_security_group.web_sg.id] + iam_instance_profile = aws_iam_instance_profile.ec2_instance_profile_a.name + + # Instantiate verifier script after app finishes + user_data = templatefile("${path.module}/../scripts/verify_logs_script.sh", { + s3_bucket_name = var.s3_bucket_name + aws_region = var.aws_region + fetch_timeout = var.verifier_lifetime + # local_copy_path = "/mylogs" + }) + + tags = { + Name = "TecheazyVerifier-${var.stage}" + Stage = var.stage + } + + depends_on = [aws_instance.app] # Wait until app deployment is complete +} diff --git a/terraform/iam.tf b/terraform/iam.tf index 2322785..4cf62b7 100644 --- a/terraform/iam.tf +++ b/terraform/iam.tf @@ -1,4 +1,5 @@ # Role A: Read-Only Access to S3 + resource "aws_iam_role" "role_a_readonly" { name = "readonly_s3_role" @@ -6,16 +7,15 @@ resource "aws_iam_role" "role_a_readonly" { Version = "2012-10-17", Statement = [ { - Effect = "Allow", - Principal = { - AWS = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/uploadonly_s3_role" - }, - Action = "sts:AssumeRole" + Effect = "Allow", + Principal = { Service = "ec2.amazonaws.com" }, + Action = "sts:AssumeRole" } ] }) } + resource "aws_iam_policy" "readonly_policy" { name = "readonly_s3_policy" description = "Allows read-only access to S3" @@ -67,7 +67,7 @@ resource "aws_iam_policy" "uploadonly_policy" { }, { Effect = "Deny", - Action = ["s3:GetBucket"], + Action = ["s3:GetObject", "s3:ListBucket"], Resource = ["arn:aws:s3:::*"] }, { diff --git a/terraform/outputs.tf b/terraform/outputs.tf index 928110c..5ba2475 100644 --- a/terraform/outputs.tf +++ b/terraform/outputs.tf @@ -6,13 +6,18 @@ output "s3_log_bucket" { value = aws_s3_bucket.log_s3_bucket.id } -output "iam_role_a_arn" { - description = "ARN of IAM Role A (read access to S3)" - value = aws_iam_role.role_a_readonly.arn +output "verifier_instance_public_ip" { + value = aws_instance.log_verifier.public_ip } -output "iam_role_b_arn" { - description = "ARN of IAM Role B (attached to EC2 instance)" - value = aws_iam_role.role_b_uploader.arn -} +# output "iam_role_a_arn" { +# description = "ARN of IAM Role A (read access to S3)" +# value = aws_iam_role.role_a_readonly.arn +# } + +# output "iam_role_b_arn" { +# description = "ARN of IAM Role B (attached to EC2 instance)" +# value = aws_iam_role.role_b_uploader.arn +# } + diff --git a/terraform/prod_config.tfvars b/terraform/prod_config.tfvars index d316391..5115b59 100644 --- a/terraform/prod_config.tfvars +++ b/terraform/prod_config.tfvars @@ -1,7 +1,9 @@ -instance_type = "t2.micro" -key_name = "ssh-key-ec2" -stage = "Prod" -shutdown_minutes = 15 -s3_bucket_name = "techeazy-logs-prod-unique123sss" # Change this! -aws_region = "ap-south-1" -repo_url = "https://github.com/techeazy-consulting/techeazy-devops" +instance_type = "t2.micro" +key_name = "ssh-key-ec2" #change this to your key-pair name +# ami_id = "ami-0f918f7e67a3323f0" +stage = "prod" +shutdown_minutes = 25 +s3_bucket_name = "techeazy-logs-unique123ss" # Change this! +aws_region = "ap-south-1" +repo_url = "https://github.com/techeazy-consulting/techeazy-devops" +verifier_lifetime = 25 diff --git a/terraform/variables.tf b/terraform/variables.tf index 208015a..310384b 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -3,10 +3,10 @@ variable "aws_region" { description = "AWS Mumbai region" } variable "ami_id" { - # default = "ami-0d03cb826412c6b0f" - # description = "AMI ID for Amazon Linux 2023" - default = "ami-0f918f7e67a3323f0" - description = "AMI ID for Ubuntu 24" + # default = "ami-0f918f7e67a3323f0" + #description = "AMI ID for Ubuntu 24" + default = "ami-00cb641b494eae1e8" #my own ec2 ami with pre installed tools + description = "Using own custom ec2 ami with pre installed aws cli v2, java 21, git, maven, curl" } variable "instance_type" { description = "EC2 instance type" @@ -26,14 +26,19 @@ variable "repo_url" { variable "s3_bucket_name" { description = "S3 bucket name for logs (must be globally unique)" type = string - default = "techeazy-logs-bucket-39u2390423" + default = "techeazy-logs-dev-unique123ss" validation { condition = length(var.s3_bucket_name) > 0 error_message = "S3 bucket name cannot be empty." } } variable "shutdown_minutes" { - description = "Auto-shutdown timer in minutes" + description = "Shutdown timer for main instance" type = number - default = 10 + default = 25 +} +variable "verifier_lifetime" { + description = "Shutdown timer for verifier instance" + type = number + default = 25 }