Skip to content

Consider redirection a success response for cert gen trigger #832

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

edwardrf
Copy link
Contributor

@edwardrf edwardrf commented Nov 5, 2024

Also create fast path for DNS check success, so no need to display the DNS setup instructions.

Example execution log:

Non-verbose:

 * Checking DNS setup for api21.defang.study
 * Please set up a CNAME record for api21.defang.study
  api21.defang.study  CNAME or as an alias to [ api.dayifunet.edwardrf.defang.app or api--80.dayifunet.edwardrf.defang.app ]
 * Waiting for CNAME record setup and DNS propagation...
 * api21.defang.study DNS is properly configured!
 * Triggering cert generation for api21.defang.study
 * Waiting for TLS cert to be online for api21.defang.study, this could take a few minutes
 * TLS cert for api21.defang.study is ready
 * Checking DNS setup for web21.defang.study
 * web21.defang.study DNS is properly configured!
 * Triggering cert generation for web21.defang.study
 * Waiting for TLS cert to be online for web21.defang.study, this could take a few minutes
 * TLS cert for web21.defang.study is ready

Verbose:

- Generating TLS cert for project "dayifunet"
 - Getting services from bucket: defang-cd-bucket-cybpbzz8hzm7 projects/dayifunet/beta/project.pb
 - Found service api with domain api21.defang.study and targets [api.dayifunet.edwardrf.defang.app api--80.dayifunet.edwardrf.defang.app]
 * Checking DNS setup for api21.defang.study
 - Server side DNS verification negative result: DNS not ready
 * Please set up a CNAME record for api21.defang.study
  api21.defang.study  CNAME or as an alias to [ api.dayifunet.edwardrf.defang.app or api--80.dayifunet.edwardrf.defang.app ]
 * Waiting for CNAME record setup and DNS propagation...
 - Server side DNS verification negative result: DNS not ready
 - Server side DNS verification negative result: DNS not ready
 - Server side DNS verification negative result: DNS not ready
 - Server side DNS verification negative result: DNS not ready
 - Server side DNS verification negative result: DNS not ready
 - Server side DNS verification negative result: DNS not ready
 - Server side DNS verification negative result: DNS not ready
 - Server side DNS verification negative result: DNS not ready
 - Server side DNS verification negative result: DNS not ready
 - Server side DNS verification negative result: DNS not ready
 - Server side DNS verification negative result: DNS not ready
 - Server side DNS verification negative result: DNS not ready
 - Server side DNS verification for api21.defang.study successful
 - CNAME for api21.defang.study is: 'api.dayifunet.edwardrf.defang.app.', err: <nil>
 - CNAME for api21.defang.study is in sync: api.dayifunet.edwardrf.defang.app
 * api21.defang.study DNS is properly configured!
 * Triggering cert generation for api21.defang.study
 - Redirecting from http://api21.defang.study to https://api21.defang.study/
 * Waiting for TLS cert to be online for api21.defang.study, this could take a few minutes
 - Error checking TLS cert for api21.defang.study: Get "https://api21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for api21.defang.study: Get "https://api21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for api21.defang.study: Get "https://api21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for api21.defang.study: Get "https://api21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for api21.defang.study: Get "https://api21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for api21.defang.study: Get "https://api21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for api21.defang.study: Get "https://api21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for api21.defang.study: Get "https://api21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for api21.defang.study: Get "https://api21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for api21.defang.study: Get "https://api21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 * TLS cert for api21.defang.study is ready
 - Found service web with domain web21.defang.study and targets [web.dayifunet.edwardrf.defang.app web--8080.dayifunet.edwardrf.defang.app]
 * Checking DNS setup for web21.defang.study
 - Server side DNS verification for web21.defang.study successful
 - CNAME for web21.defang.study is: 'web.dayifunet.edwardrf.defang.app.', err: <nil>
 - CNAME for web21.defang.study is in sync: web.dayifunet.edwardrf.defang.app
 * web21.defang.study DNS is properly configured!
 * Triggering cert generation for web21.defang.study
 - Redirecting from http://web21.defang.study to https://web21.defang.study/
 - cert gen request success, received redirect to https://web21.defang.study/
 * Waiting for TLS cert to be online for web21.defang.study, this could take a few minutes
 - Error checking TLS cert for web21.defang.study: Get "https://web21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for web21.defang.study: Get "https://web21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for web21.defang.study: Get "https://web21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for web21.defang.study: Get "https://web21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for web21.defang.study: Get "https://web21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for web21.defang.study: Get "https://web21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for web21.defang.study: Get "https://web21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for web21.defang.study: Get "https://web21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for web21.defang.study: Get "https://web21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for web21.defang.study: Get "https://web21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for web21.defang.study: Get "https://web21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 - Error checking TLS cert for web21.defang.study: Get "https://web21.defang.study": tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead
 * TLS cert for web21.defang.study is ready
For help with warnings, check our FAQ at https://docs.defang.io/docs/faq

@edwardrf edwardrf requested a review from lionello November 5, 2024 22:44
@edwardrf edwardrf merged commit db6bf4c into main Nov 5, 2024
13 checks passed
@edwardrf edwardrf deleted the edw/cert-gen-ignore-server-err branch November 5, 2024 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants