Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Env variable not getting set properly #198

Open
Pavan-Singh-V opened this issue Mar 11, 2024 · 2 comments
Open

Env variable not getting set properly #198

Pavan-Singh-V opened this issue Mar 11, 2024 · 2 comments

Comments

@Pavan-Singh-V
Copy link

Description

We have a CAP-Java based multi-tenant application.

We have cf-jobscheduler service with standard plan which we have defined in mat.yaml

name: cmh-job-scheduler
type: org.cloudfoundry.managed-service
parameters:
service: jobscheduler
service-plan: standard
When we use this service we have to maintain url for jobs and we set that in mat.yaml with our service url.

But we see this url is not getting set as expected. The configuration was working fine previously.

We see the same url is being set in User Env variable the value is coming fine there.

An extra value idle is getting added in the url.

Can you please help us understand why this difference.

Please provide the following info:

MBT Version: 1.2.25
OS Version: Cloud
If possible, provide a link to the project.
Steps to Reproduce:

We can check in env variables.

User provided Variables .

"user-provided": [ { "label": "user-provided", "name": "cmh-default-jobs", "tags": [], "instance_guid": "8b13f74d-4f81-44f9-8d77-aca50d37801e", "instance_name": "cmh-default-jobs", "binding_guid": "e0ba288c-10c0-44d1-a889-8cdcfd6b3bbf", "binding_name": null, "credentials": { "jobs": [ { "action": "https://quality-canaryquality-cmh-srv-idle.cfapps.eu12.hana.ondemand.com/job/cmh/sipstatus", "active": true, "description": "Job to get the 8D status", "httpMethod": "GET", "jobDetails": { "frequency": "15 minutes", "jobName": "notify8Dstatus", "jobType": "repeatInterval", "type": "recurring" }, "name": "Notify 8D Status", "schedules": [ { "active": true, "description": "This job runs every 15 minutes", "repeatInterval": "15 minutes", "startTime": { "date": "2021-01-01", "format": "YYYY-MM-DD" } } ] }, { "action": "https://quality-canaryquality-cmh-srv-idle.cfapps.eu12.hana.ondemand.com/job/cmh/shipmentconfirmationjob", "active": true, "description": "Job to auto reject and trigger shipment confirmation reminder emails", "httpMethod": "GET", "name": "Shipment Confirmation Job", "schedules": [ { "active": true, "cron": "* * * * 0 0 0", "description": "This job runs at 00:00 every day", "startTime": { "date": "2023-02-13", "format": "YYYY-MM-DD" } } ] }, { "action": "https://quality-canaryquality-cmh-srv-idle.cfapps.eu12.hana.ondemand.com/api/meter/metering", "active": true, "description": "Used to report the metering data", "httpMethod": "GET", "name": "Report Usage", "schedules": [ { "active": true, "cron": "* * * * 0 0 0", "description": "This job runs at 00:00 every day", "startTime": { "date": "2024-01-01", "format": "YYYY-MM-DD" } } ] }, { "action": "https://quality-canaryquality-cmh-srv-idle.cfapps.eu12.hana.ondemand.com/job/cmh/suppliercomplaintsautoapprove", "active": true, "description": "Job for Supplier Complaints Auto Approval", "httpMethod": "GET", "name": "Supplier Complaints Auto Approve", "schedules": [ { "active": true, "cron": "* * * * 0 0 0", "description": "This job runs once a day", "startTime": { "date": "2023-09-01", "format": "YYYY-MM-DD" } } ] }, { "action": "https://quality-canaryquality-cmh-srv-idle.cfapps.eu12.hana.ondemand.com/job/cmh/scrapautocancel", "active": true, "description": "Job to auto cancel scrap Requests", "httpMethod": "GET", "name": "Scrap Request Auto Reject", "schedules": [ { "active": true, "cron": "* * * * 0 0 0", "description": "This job runs at 00:00 every day", "startTime": { "date": "2023-08-21", "format": "YYYY-MM-DD" } } ] }, { "action": "https://quality-canaryquality-cmh-srv-idle.cfapps.eu12.hana.ondemand.com/job/cmh/triggerScrapReminder", "active": true, "description": "Job to trigger scrap request reminder", "httpMethod": "GET", "name": "Scrap Request Reminder", "schedules": [ { "active": true, "cron": "* * * * 0 0 0", "description": "This job runs at 00:00 every day", "startTime": { "date": "2023-08-21", "format": "YYYY-MM-DD" } } ] }, { "action": "https://quality-canaryquality-cmh-srv-idle.cfapps.eu12.hana.ondemand.com/job/cmh/triggerSupplierApprovalReminder", "active": true, "description": "Job for Supplier Complaints Auto Approval Reminder", "httpMethod": "GET", "name": "Supplier Complaints Auto Approve Reminder", "schedules": [ { "active": true, "cron": "* * * * 0 0 0", "description": "This job runs at 00:00 every day", "startTime": { "date": "2024-02-20", "format": "YYYY-MM-DD" } } ] } ] }, "syslog_drain_url": "", "volume_mounts": [] } ],

Your environment

  • MultiApps Controller version -
  • MultiApps CF CLI Plugin version -
  • which CF vendor is used -
  • which backing services are used -

We had raised a CAP Issue: https://github.tools.sap/cap/issues/issues/15526
They re-directed us here.

@Pavan-Singh-V
Copy link
Author

Hi Team,
Can we get any response please. Its a hight incident for us.
Thanks

@theghost5800
Copy link
Contributor

Hi @Pavan-Singh-V , the reason why idle suffix was getting added to the parameters of resource/service instance is due to flow of blue-green update where at first phase, new application are created with idle suffixes in routes and service instances are updated in the first half of the blue green deployment. "default-url" parameter is generated parameter and in the first phase of the blue green update it contains url including idle suffix but after confirmation phase and switch routes to new applications, this env configuration will be updated but not service instances.

So to resolve this issue, please use custom defined url parameter and use it as reference across resource parameters.

This is a public channel and it's better to use internal channels for future sap support requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants