none
Auto swap not working with MSDN subscription? RRS feed

  • Question

  • Hi I am currently evaluating Web Apps and the Deployment Slots and Auto Swap features in particular.

    I followed the instructions to set up a staging deployment slot and manual swapping works fine.

    However if a deployment is triggered via Continious Deployment (Bitbucket) the Auto Swap does not get triggered.

    Thanks for your help!

    P.S.: Can I find human readable operation logs in the new portal regarding deployments and auto swap?


    • Edited by Micha030 Thursday, December 17, 2015 10:04 AM
    Thursday, December 17, 2015 10:03 AM

Answers

  • Hi Micha,

    I assume that you manually enabled the AutoSwap feature in the Staging slot, right?

    AutoSwap makes an HTTP GET request to the Staging Slot (WarmUp) and waits for a response. If your site fails to respond (no HTTP 200), it won't swap.

    Are you sure that your staging slot is responding to a GET on the root?

    Additionally you can personalize the GET route by using the applicationInitialization node on web.config.

    • Marked as answer by Micha030 Friday, January 15, 2016 10:48 AM
    Tuesday, December 22, 2015 12:18 PM

All replies

  • Hello,

    can you please let us know the name of your site so that we can investigate? Use this procedure to report the site name. https://github.com/projectkudu/kudu/wiki/Reporting-your-site-name-without-posting-it-publicly


    http://ruslany.net/

    Thursday, December 17, 2015 5:45 PM
  • Hi - sure,

    I created a dummy site for you in the sam app service plan http://forazureformus.azurewebsites.net/ 

    Cheers

    Michael


    Michael

    Friday, December 18, 2015 8:14 AM
  • It's the website starting with a 'v'

    Michael

    Friday, December 18, 2015 11:00 AM
  • Just a quick update. I deployed via Bitbucket to my staging deployment slot (with AutoSwap to production enabled) a few more times now. AutoSwap is consistently not working for me. Staging keeps getting updated and production stays at the initial version prior to all mentioned deployments.



    Michael


    • Edited by Micha030 Monday, December 21, 2015 9:53 AM
    Monday, December 21, 2015 9:53 AM
  • Hi Micha,

    I assume that you manually enabled the AutoSwap feature in the Staging slot, right?

    AutoSwap makes an HTTP GET request to the Staging Slot (WarmUp) and waits for a response. If your site fails to respond (no HTTP 200), it won't swap.

    Are you sure that your staging slot is responding to a GET on the root?

    Additionally you can personalize the GET route by using the applicationInitialization node on web.config.

    • Marked as answer by Micha030 Friday, January 15, 2016 10:48 AM
    Tuesday, December 22, 2015 12:18 PM
  • Hey Ealsur,

    thanks for the feedback. The root will return a 301 and redirects to /app so that might be the issue. I'll test it.

    Would be nice to be able to configure this (either to where the initial GET is sent to or what response codes are considered positive)


    Michael


    • Edited by Micha030 Wednesday, December 23, 2015 8:54 AM
    Wednesday, December 23, 2015 8:52 AM
  • Or how about a simple notification that AutoSwap failed and why :)

    Michael

    Wednesday, December 23, 2015 8:56 AM
  • I changed to root of my test app from /app to / now. But we have another problem. On unauthenticated requests I also do a 302 redirect to the login url. 

    I could change that of cource but it feels silly to have to do that...


    Michael


    • Edited by Micha030 Wednesday, December 23, 2015 1:24 PM
    Wednesday, December 23, 2015 1:24 PM
  • The reason behind the required HTTP 200 is to ensure that your App "works" before doing the AutoSwap (would be terrible if it AutoSwapped a failing App).

    I agree that it could contemplate other status codes, in the meantime, maybe you could add an empty controller/action just for the AutoSwap. You could take advantage of it to do any kind of warm-up (init of services for example).

    If the personalization of the GET route solved your problem, please mark the answer so others can benefit from it :)

    Wednesday, December 23, 2015 6:41 PM
  • Hi Micha030,

    Sorry about the late reply on this. I've looked into the logs for the site that starts with "v" and I see that there were 2 successful auto-swaps on Jan 1st and Jan 4th. Does it mean that you figured out what was the problem?

    Regarding the lack of notification that autoswap failed - it is a known issue we are going to fix in the upcoming releases.


    http://ruslany.net/

    • Marked as answer by Micha030 Friday, January 15, 2016 10:50 AM
    • Unmarked as answer by Micha030 Friday, January 15, 2016 10:50 AM
    Monday, January 4, 2016 7:50 PM
  • Yes the autoswap started working after I made sure to return a 200 status code from the site root.

    Good to know that you actually can customize the verification/warmup endpoint in web.config. 

    To be honest I switched to using Heroku for now as the deployment of my project is way faster there even on the free tier and it meets my needs for now in this case.  


    Michael

    Friday, January 15, 2016 10:54 AM