URL routing screwed up after deployment

181 views
Skip to first unread message

Mayank Bhagya

unread,
Jul 4, 2016, 1:54:13 PM7/4/16
to Google App Engine
We have a jenkins push-to-deploy setup that uses gcloud to deploy an appengine application.

After the deployment, suddenly all requests going to a module B start going to a module A (default module)!?

How is that possible?
Why is the dispatcher screwed up after a 'gcloud preview app deploy'.
This has hurt many of our users today.

Nicholas (Google Cloud Support)

unread,
Jul 5, 2016, 4:17:33 PM7/5/16
to Google App Engine
There are a few ways requests hitting the App Engine servers get routed to your application's modules.  Namely, URL routing and via dispatch rules.  If there is dispatch.yaml in your `gcloud app deploy` command, the rules contained within will be applied before URL routing.
  • What dispatch rules do you have in your dispatch.yaml?
  • A request to what URL was incorrectly routed to your default module?
  • What specific rules are expected to route requests to module B?

Mayank Bhagya

unread,
Jul 5, 2016, 4:28:36 PM7/5/16
to Google App Engine
Hello Nicholas,

Yes, there is a dispatch.yaml file in the code, but that is not present in the `gcloud preview app deploy' because there is no change in the routing rules.

As per dispatch.yaml, there is a rule:
   module: B

However, after a deployment, all requests of the form 'myapp.appspot.com/hello/referrer', which usually go to B, started being redirected to A, which is the default module.
After 10 odd minutes, this gets auto fixed. This is extremely strange.

Also, that is the only rule that redirects to module B.

Mayank Bhagya

unread,
Jul 8, 2016, 1:42:01 AM7/8/16
to Google App Engine
Any updates here Nicholas?

Nicholas (Google Cloud Support)

unread,
Jul 8, 2016, 5:02:57 PM7/8/16
to Google App Engine
I have not been able to reproduce this behavior.  I tested the following dispatch file:
dispatch.yaml
dispatch:
- url: "myapp.appspot.com/*"
 
module: b

The default module responds 'Hello from default module' while module b responds with 'Hello from module b'.  Going to any URL starting with myapp.appspot.com/ always brought me to module b for any length of time.
  • Are there any other dispatch rules that might supersede the above?
  • Have there been any other deployments that might contradict the yours?
  • Can you provide a lightweight reproduction including both modules?

On Monday, July 4, 2016 at 1:54:13 PM UTC-4, Mayank Bhagya wrote:

Mayank Bhagya

unread,
Jul 9, 2016, 1:01:23 AM7/9/16
to google-a...@googlegroups.com
I am not sure if I can provide you reproducible modules because as I said in the first place, this is intermittent.

This gets rectified automatically, a few minutes after the deployment! You might want to check what happens immediately after a deployment and how could this possibly happen.

And no, there aren't any superseding rules. Because if there were, the incorrect behavior would persist. But a few minutes into running the new deployment, this gets rectified automatically.

-mayank


--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/4n3W5xUdsxs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/c1ff0316-22d9-4b6c-951d-63ba4ae305f1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Nicholas (Google Cloud Support)

unread,
Jul 20, 2016, 2:30:38 PM7/20/16
to Google App Engine
Unfortunately, after much effort and many attempts, I have not been able to reproduce this issue.  Immediately after deployment, even in some cases before appcfg.py and gcloud app deploy confirm that deployment was successful, requests are appropriately routed to module B as expected.

Should you continue to face this issue and can provide logs for deployment times, dispatch yaml and requests incorrectly routed, please file a defect report on the App Engine public issue tracker so that we may attempt to investigate this further while this is in effect.


On Monday, July 4, 2016 at 1:54:13 PM UTC-4, Mayank Bhagya wrote:
Reply all
Reply to author
Forward
0 new messages