Skip to content

RHcloud deploys get stuck & time out #115

Closed

Description

@cben

Bah! Why won't production Just Work and leave me alone? :-(

Tonight:

+ git push rhcloud origin/gh-pages:master
Counting objects: 18, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (18/18), done.
Writing objects: 100% (18/18), 3.20 KiB | 0 bytes/s, done.
Total 18 (delta 10), reused 0 (delta 0)
remote: Stopping NodeJS cartridge
remote: Thu Aug 13 2015 18:34:04 GMT-0400 (EDT): Stopping application 'mathdown' ...
remote: Thu Aug 13 2015 18:34:06 GMT-0400 (EDT): Stopped Node application 'mathdown'

Write failed: Broken pipe
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

today I re-run deploy.sh (same up to README changes) and it's now stuck too on:

remote: Stopping NodeJS cartridge
remote: Fri Aug 14 2015 03:05:52 GMT-0400 (EDT): Stopping application 'mathdown' ...
remote: Fri Aug 14 2015 03:05:52 GMT-0400 (EDT): Stopped Node application 'mathdown'

https://mathdown-cben.rhcloud.com/haproxy-status/ shows it's the "local-gear" (the one co-living with haproxy)

Activity

  1. cben commented on Aug 14, 2015

    @cben
    OwnerAuthor

    Will wait to see if it comes back automatically (just out of curiousity).

    Then probably will pull the "Restart Application" trigger in the dashboard.

  2. cben commented on Aug 14, 2015

    @cben
    OwnerAuthor

    git push is still stuck; the gear is back up.
    interestingly, both gears have been restarted — 9m37s UP (local) & 10m20s UP (the other).
    If both have been pushed, git push should have printed a lot about that.
    https://mathdown-cben.rhcloud.com/deployment/deploy.sh (new file in this commit) is 404.

    $ rhc ssh --gears mathdown -- ls app-root/repo/deployment
    === 546a6d7e5973cac907000028 haproxy-1.4+nodejs-0.10
    deploy.sh
    dns-cloudflare
    dns-dnsimple
    README.md
    tls-certs-startcom
    === 54e3b3f2fcf933a3060000cd haproxy-1.4+nodejs-0.10
    dns-cloudflare
    dns-dnsimple
    README.md
    tls-certs-startcom
    

    Yes, only one has been deployed.
    (conceptually, that's worse than one node staying down: mixed versions served randomly to users!)

    It's strange they're both listed as having haproxy!
    But rhc ssh --gears mathdown -- ps aux shows only 546a6d7e5973cac907000028 actually runs haproxy.

  3. cben commented on Aug 14, 2015

    @cben
    OwnerAuthor

    Pulled the restart trigger => Application mathdown has restarted.
    ssh ls shows they're still mixed versions :-(
    Let's try deploy again.

  4. cben commented on Aug 14, 2015

    @cben
    OwnerAuthor
    + git push rhcloud origin/gh-pages:master
    Everything up-to-date
    

    Since the main gear is up-to-date and the secondary isn't, let's try reducing to 1 gear and back.

  5. cben commented on Aug 14, 2015

    @cben
    OwnerAuthor

    Downscaling from 2–5 gears to 1–1 worked.
    Upscaling back to 2–5 failed, twice:

    Unable to complete the requested operation. Show less

    deployment_id must be supplied
    Unable to complete the requested operation due to: An invalid exit code (1) was returned from the server ex-std-node638.prod.rhcloud.com. This indicates an unexpected problem during the execution of your request.
    Reference ID: 9aba0349e6e0858d78523d977b666ea6

    should contact support.

  6. cben commented on Aug 16, 2015

    @cben
    OwnerAuthor

    git fsck on the gear (under app-root/git/mathdown.git) had no complaints.

    Didn't find any problems (or generally traces of the attempted deploys & scaling) anywhere in app-root/logs/...

    Same from command line:

    $ rhc cartridge scale -a mathdown
    Missing required argument 'cartridge'.
    Usage: rhc cartridge-scale <cartridge> [multiplier] [--namespace NAME] [--app NAME] [--min min] [--max max]
    Pass '--help' to see the full list of options
    ~ $ rhc cartridge scale node -a mathdown --min 2 --max 5
    Using nodejs-0.10 (Node.js 0.10) for 'node'
    This operation will run until the application is at the minimum scale and may take several minutes.
    Setting scale range for nodejs-0.10 ... 
    Unable to complete the requested operation due to: An invalid exit code (1) was returned from the server ex-std-node638.prod.rhcloud.com.  This indicates an unexpected problem during the execution of your
    request.
    Reference ID: 05e26de2bd916e2fd87907a53a5c8108
    

    Turns out I have no support on bronze plan, only IRC. Though that might be actually faster. Except it might be unproductive if I can't stay in the conversation.

    A hypothesis I want to check: now that I have 1 gear, git push deploys will probably work.
    It seems it's the main gear -> extra gears deploy that's borked.

  7. cben commented on Aug 29, 2015

    @cben
    OwnerAuthor

    Simpler idea: since RHcloud currenly only serves mathdown.com (mathdown.net points to Heroku),
    I'll just destroy and re-create the app. I'm 90% sure it'll work.

  8. cben commented on Aug 29, 2015

    @cben
    OwnerAuthor

    First did a last experiment:

    $ rhc app tidy -a mathdown
    RESULT:
    mathdown cleaned up
    

    followed by deploy.sh.
    I don't really expect app tidy to help but the deploy might succeed since I now have only 1 gear.
    (Side effect of having 1 gear: "Monitor is DOWN: mathdown.com" — deploys cause downtime)

    => Yes, deploy worked.

  9. cben commented on Aug 29, 2015

    @cben
    OwnerAuthor

    But as already established, main gear -> extra gears copy is the broken part:

    $ rhc cartridge scale node -a mathdown --min 2 --max 5
    Using nodejs-0.10 (Node.js 0.10) for 'node'
    This operation will run until the application is at the minimum scale and may take several minutes.
    Setting scale range for nodejs-0.10 ... Server returned an unexpected error code: 504
    
  10. cben commented on Aug 29, 2015

    @cben
    OwnerAuthor

    Pulled the trigger:

    $ rhc app delete -a mathdown
    ... deleted
    

    Created via Launch on OpenShift button in readme. Enabled scaling (but still at 1 gear).
    Wow, it's slow. (aka I'm spoiled by Heroku).
    App exists, haproxy still shows 0 gears, gear status in dashboard is "Building".
    Scaling is default 1-16.

    Wait, what just happened?!

    Application '55e22d8f7628e18a6f0000d9' does not exist
    Reference #92544a002fc757c7b015476bc10d0cb7

  11. cben commented on Aug 29, 2015

    @cben
    OwnerAuthor

    random theory (for what just happened, not the original issue): I hit the inodes limit.
    This doesn't hold water. mathdown8staging was created fine (though it's now giving 95% inodes warning).

    Anyway trying again, this time will increase to 2GB as soon as dashboard is live.
    => "Unable to perform action on app object. Another operation is already running."

    Bah.

    Application '55e230252d5271f1970000d6' does not exist

    OK, again, without scaling (which is how the Launch on OpenShift has worked so far).

  12. cben commented on Aug 29, 2015

    @cben
    OwnerAuthor

    Yay! It's up.
    Set storage to 2GB.

    Bah! I can't turn it to scalable now :-(

    mathdown is not scalable

    This application is not currently scalable. For the time being applications must be set to scale when they are created. To make a new application scalable you will need to pass the command line option --scaling:

    rhc create-app --scaling -a ...
    or select "scaling" from the advanced options on the Create Application page.

  13. cben commented on Aug 29, 2015

    @cben
    OwnerAuthor

    OK, let's set up TLS certs to be back up, tomorrow study the problem on another app.

    $ ./deployment/tls-certs-startcom/rhc-set-certs.sh mathdown ~/StartSSL/my-private-decrypted.key
    ++ dirname ./deployment/tls-certs-startcom/rhc-set-certs.sh
    + cd ./deployment/tls-certs-startcom
    + appopts=($1)
    + '[' -z '' ']'
    + keyopts=(--private-key="$2")
    + cat mathdown.com-until-2016-02-12.pem StartCom-chain-sub.class1.server.ca.pem
    + cat mathdown.net-until-2016-02-15.pem StartCom-chain-sub.class1.server.ca.pem
    + echo '== before: =='
    == before: ==
    + rhc alias list mathdown
    No aliases associated with the application mathdown.
    + rhc alias add mathdown mathdown.net
    Alias 'mathdown.net' has been added.
    + rhc alias add mathdown www.mathdown.net
    Alias 'www.mathdown.net' has been added.
    + rhc alias add mathdown mathdown.com
    Alias 'mathdown.com' has been added.
    + rhc alias add mathdown www.mathdown.com
    Alias 'www.mathdown.com' has been added.
    + rhc alias update-cert mathdown mathdown.net --certificate GENERATED-CHAINED-mathdown.net.pem --private-key=/home/beni/StartSSL/my-private-decrypted.key
    SSL certificate successfully added.
    + rhc alias update-cert mathdown www.mathdown.net --certificate GENERATED-CHAINED-mathdown.net.pem --private-key=/home/beni/StartSSL/my-private-decrypted.key
    SSL certificate successfully added.
    + rhc alias update-cert mathdown mathdown.com --certificate GENERATED-CHAINED-mathdown.com.pem --private-key=/home/beni/StartSSL/my-private-decrypted.key
    SSL certificate successfully added.
    + rhc alias update-cert mathdown www.mathdown.com --certificate GENERATED-CHAINED-mathdown.com.pem --private-key=/home/beni/StartSSL/my-private-decrypted.key
    SSL certificate successfully added.
    + echo '== after: =='
    == after: ==
    + rhc alias list mathdown
    Alias            Has Certificate? Certificate Added
    ---------------- ---------------- -----------------
    mathdown.net     yes              2015-08-29
    www.mathdown.net yes              2015-08-29
    mathdown.com     yes              2015-08-29
    www.mathdown.com yes              2015-08-29
    

    New theory: the gear state wasn't broken, there is something inherent in my current code that's undeployable to a new gear.
    Best random guess: npm shrinkwrap (see warnings #82 (comment)).
    But I can do better that guess: I can create from empty repo and and then try pushing current code, and I can even git bisect creation (by moving a branch wherever git bisect points me)!

  14. 23 remaining items

  15. cben commented on Sep 7, 2015

    @cben
    OwnerAuthor

    Experimented with mathjax via npm instead of submodule [6eff9f6, f7e0618].
    Timed out.

    Learnt a trick for timing build: as soon as possible to ssh, run:

    rhc ssh APP -n mathdown 'tail -f /tmp/initial-build.log' | ts -i
    

    Let's try that again...

  16. cben commented on Sep 7, 2015

    @cben
    OwnerAuthor
    $ rhc ssh npmmathjax -n mathdown 'ps auxf; tail -f /tmp/initial-build.log' | ts -i
    00:00:05 USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
    00:00:00 2389     388071  0.0  0.0 108792  2744 ?        S    08:03   0:00 sshd: 55ed7c8b0c1e66582e0000b7@notty
    00:00:00 2389     388073  0.0  0.0 106104  1196 ?        Ss   08:03   0:00  \_ /bin/bash -c ps auxf; tail -f /tmp/initial-build.log
    00:00:00 2389     388074  0.0  0.0 108108   984 ?        R    08:03   0:00      \_ ps auxf
    00:00:00 2389     386804  0.0  0.0 106104  1172 ?        Ss   08:03   0:00 /bin/sh -c gear postreceive --init >> /tmp/initial-build.log 2>&1
    00:00:00 2389     386805  5.5  0.2 362360 36768 ?        Sl   08:03   0:01  \_ ruby /usr/bin/gear postreceive --init
    00:00:00 2389     387879  0.0  0.0   9236  1092 ?        S    08:03   0:00      \_ sh -c set -e; /var/lib/openshift/55ed7c8b0c1e66582e0000b7/nodejs/bin/control build 
    00:00:00 2389     387882  0.0  0.0   9504  1472 ?        S    08:03   0:00          \_ /bin/bash /var/lib/openshift/55ed7c8b0c1e66582e0000b7/nodejs/bin/control build
    00:00:00 2389     387950  0.0  0.0   9504   888 ?        S    08:03   0:00              \_ /bin/bash /var/lib/openshift/55ed7c8b0c1e66582e0000b7/nodejs/bin/control build
    00:00:00 2389     387951  0.0  0.0   4068   520 ?        S    08:03   0:00                  \_ /usr/bin/scl enable v8314 nodejs010 npm install -d
    00:00:00 2389     387952  0.0  0.0   9236  1192 ?        S    08:03   0:00                      \_ /bin/bash /var/tmp/scl4DgQ2j
    00:00:00 2389     387963 85.1  0.8 1071476 125172 ?      Rl   08:03   0:09                          \_ npm                                               
    00:00:00 2389     386505  0.0  0.0 185752  4400 ?        Sl   08:03   0:00 /usr/bin/logshifter -tag haproxy_ctld
    00:00:00 2389     386504  0.0  0.0   9240  1108 ?        S    08:03   0:00 bash /var/lib/openshift/55ed7c8b0c1e66582e0000b7/haproxy/usr/bin/haproxy_ctld
    00:00:00 2389     386521  0.1  0.0  40768  8156 ?        Sl   08:03   0:00  \_ ruby /var/lib/openshift/55ed7c8b0c1e66582e0000b7/haproxy/usr/bin/haproxy_ctld.rb
    00:00:00 2389     386503  0.0  0.0  15368  1260 ?        S    08:03   0:00 /usr/sbin/haproxy -f /var/lib/openshift/55ed7c8b0c1e66582e0000b7/haproxy//conf/haproxy.cfg
    00:00:00 2389     386502  0.0  0.0 185624  4404 ?        Sl   08:03   0:00 /usr/bin/logshifter -tag haproxy
    00:00:00 npm info retry fetch attempt 1 at 08:03:47
    00:00:00 npm http GET https://registry.npmjs.org/mathjax/-/mathjax-2.5.1.tgz
    00:00:00 npm info retry fetch attempt 1 at 08:03:47
    00:00:00 npm http GET https://registry.npmjs.org/st/-/st-0.5.5.tgz
    00:00:00 npm http GET https://registry.npmjs.org/chalk/-/chalk-1.1.1.tgz
    00:00:00 npm http GET https://registry.npmjs.org/coffee-script/-/coffee-script-1.10.0.tgz
    00:00:00 npm http 200 https://registry.npmjs.org/chalk/-/chalk-1.1.1.tgz
    00:00:00 npm http 200 https://registry.npmjs.org/st/-/st-0.5.5.tgz
    00:00:00 npm http 200 https://registry.npmjs.org/coffee-script/-/coffee-script-1.10.0.tgz
    00:00:00 npm http 200 https://registry.npmjs.org/mathjax/-/mathjax-2.5.1.tgz
    00:01:26 npm info install [email protected] into /var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-root/runtime/repo
    00:00:00 npm info install [email protected] into /var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-root/runtime/repo
    00:00:00 npm info install [email protected] into /var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-root/runtime/repo
    00:00:00 npm info install [email protected] into /var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-root/runtime/repo
    00:00:00 npm info installOne [email protected]
    ...
    00:00:00 npm http GET https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.1.0.tgz
    00:00:00 npm http GET https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.3.tgz
    ...
    00:00:00 npm info build /var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-root/runtime/repo/node_modules/chalk/node_modules/escape-string-regexp
    00:00:00 npm info linkStuff [email protected]
    00:00:00 npm info preinstall [email protected]
    ...
    00:00:00 npm info build /var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-root/runtime/repo/node_modules/st
    00:00:00 npm info linkStuff [email protected]
    00:00:00 npm info install [email protected]
    00:00:00 npm info postinstall [email protected]
    00:01:31 npm info preinstall [email protected]
    00:00:00 npm info build /var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-root/runtime/repo/node_modules/mathjax
    00:00:00 npm info linkStuff [email protected]
    00:00:00 npm info install [email protected]
    00:00:00 npm info postinstall [email protected]
    ...
    00:00:00 npm info ok 
    00:00:00 Preparing build for deployment
    00:00:21 An error occurred executing 'gear postreceive' (exit code: 23)
    00:00:00 Error message: Shell command '/usr/bin/rsync -avS --delete /var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-root/runtime/repo/ /var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/' returned an error. rc=23
    00:00:00 stdout: sending incremental file list
    00:00:00 ./
    00:00:00 .gitignore
    ...
    00:00:00 node_modules/mathjax/fonts/HTML-CSS/TeX/png/AMS/Regular/100/21B0.png
    00:00:01 node_modules/mathjax/fonts/HTML-CSS/TeX/png/AMS/Regular/100/21B1.png
    00:00:00 node_modules/mathjax/fonts/HTML-CSS/TeX/png/AMS/Regular/100/21B6.png
    ...
    00:00:00 node_modules/st/node_modules/
    00:00:00 node_modules/st/test/
    00:00:00 
    00:00:00 sent 32980256 bytes  received 250077 bytes  1545596.88 bytes/sec
    00:00:00 total size is 67171997  speedup is 2.02
    00:00:00 stderr: rsync: mkstemp "/var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/node_modules/mathjax/fonts/HTML-CSS/TeX/png/Main/Bold/085/.03A8.png.OyJdtw" failed: Disk quota exceeded (122)
    00:00:00 rsync: mkstemp "/var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/node_modules/mathjax/fonts/HTML-CSS/TeX/png/Main/Bold/085/.03A9.png.sNffOO" failed: Disk quota exceeded (122)
    00:00:00 rsync: mkstemp "/var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/node_modules/mathjax/fonts/HTML-CSS/TeX/png/Main/Bold/085/.2002.png.q8yl96" failed: Disk quota exceeded (122)
    00:00:00 rsync: mkstemp "/var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/node_modules/mathjax/fonts/HTML-CSS/TeX/png/Main/Bold/085/.2003.png.1Naxup" failed: Disk quota exceeded (122)
    ...
    00:00:00 rsync: mkstemp "/var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/node_modules/mathjax/fonts/HTML-CSS/TeX/png/Main/Bold/336/.2227.png.tu0H6V" failed: Disk quota exceeded (122)
    00:00:00 rsync: mkstemp "/var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/node_modules/mathjax/fonts/HTML-CSS/TeX/png/Main/Bold/336/.2228.png.cyaZXh" failed: Disk quota exceeded (122)
    00:00:00 rsync: mkstemp "/var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/node_modules/mathjax/fonts/HTML-CSS/TeX/png/Main/Bold/336/.2229.png.UXHwQD" failed: Disk quota exceeded (122)
    00:00:00 rsync: recv_generator: mkdir "/var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/node_modules/mathjax/fonts/HTML-CSS/TeX/png/Main/Italic/050" failed: Disk quota exceeded (122)
    00:00:00 *** Skipping any contents from this failed directory ***
    00:00:00 rsync: recv_generator: mkdir "/var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/node_modules/mathjax/fonts/HTML-CSS/TeX/png/Main/Italic/060" failed: Disk quota exceeded (122)
    00:00:00 *** Skipping any contents from this failed directory ***
    00:00:00 rsync: recv_generator: mkdir "/var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/node_modules/mathjax/fonts/HTML-CSS/TeX/png/Main/Italic/071" failed: Disk quota exceeded (122)
    00:00:00 *** Skipping any contents from this failed directory ***
    00:00:00 rsync: recv_generator: mkdir "/var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/node_modules/mathjax/fonts/HTML-CSS/TeX/png/Main/Italic/085" failed: Disk quota exceeded (122)
    00:00:00 *** Skipping any contents from this failed directory ***
    00:00:00 rsync: mkstemp "/var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/node_modules/mathjax/fonts/HTML-CSS/TeX/png/Main/Bold/336/.222A.png.pebSKZ" failed: Disk quota exceeded (122)
    00:00:00 rsync: mkstemp "/var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/node_modules/mathjax/fonts/HTML-CSS/TeX/png/Main/Bold/336/.222B.png.fk0lFl" failed: Disk quota exceeded (122)
    ...
    00:00:00 rsync: mkstemp "/var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/node_modules/mathjax/fonts/HTML-CSS/TeX/png/Main/Bold/400/.006A.png.ERBMvg" failed: Disk quota exceeded (122)
    Write failed: Broken pipe
    00:00:00 rsync: mkstemp "/var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/node_modules/mathjax/fonts/HTML-CSS/TeX/png/Main/Bold/400/.006B.png.zN4LFC" failed: Disk quota exceeded (122)
    ...
    00:00:00 rsync: mkstemp "/var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/node_modules/mathjax/fonts/HTML-CSS/TeX/png/Main/Bold/476/.02D9.png.FvN0TD" failed: Disk quota exceeded (122)
    00:00:00 rsync: mkstemp "/var/lib/openshift/55ed7c8b0c1e66582e0000b7/app-deployments/2015-09-07_08-03-29.315/repo/node_modules/mathjax/fonts/HTML-CSS/TeX/png/Main/Bold/476/.02DA.png.VG8IF0" failed: Disk quota exceeded (122)
    00:00:00 rsync: mkstemp "/⏎                                                                                                                                                                                        
    

    Hmm.

  17. cben commented on Sep 7, 2015

    @cben
    OwnerAuthor

    Tried medium gear. Subjectively faster, failed quota too:

    DEBUG: Request POST https://openshift.redhat.com/broker/rest/domain/mathdown/applications
    DEBUG:    code 422 169655 ms
    Warning: Gear 55edcc3c7628e1a63200018d is using 100.0% of inodes allowed
    The initial build for the application failed: Shell command '/sbin/runuser -s /bin/sh 55edcc3c7628e1a63200018d -c "exec /usr/bin/runcon 'unconfined_u:system_r:openshift_t:s0:c2,c144' /bin/sh -c \"gear
    postreceive --init >> /tmp/initial-build.log 2>&1\""' returned an error. rc=255
    
    .Last 10 kB of build output:
     recv_generator: mkdir "/var/lib/openshift/55edcc3c7628e1a63200018d/app-deployments/2015-09-07_13-41-54.314/repo/node_modules/mathjax/localization/oc" failed: Disk quota exceeded (122)
    *** Skipping any contents from this failed directory ***
    ...
    
  18. cben commented on Sep 7, 2015

    @cben
    OwnerAuthor

    Another undocumented option?

    For more details about the problem, try running the command again with the '--trace' option.
    

    On second attempt with -g medium --trace, created successfully and rather fast:

    DEBUG: Request POST https://openshift.redhat.com/broker/rest/domain/mathdown/applications
    DEBUG:    code 201 138436 ms
    

    EDIT: ah, that's for deploying gh-pages, not the npm-mathjax branch.

    This is embarassingly simple. If I want stuff to move faster I should pay for a beefier machine slice!

    Let's try small.highcpu gear.

  19. cben commented on Sep 7, 2015

    @cben
    OwnerAuthor

    small.highcpu worked too (151041ms for the critical POST).
    That's good as small.highcpu is already $18/mo per gear, and I want at least 2 (for zero-downtime deploys), vs $36/mo per medium gear.

  20. cben commented on Sep 7, 2015

    @cben
    OwnerAuthor

    Quota is same for any gear size: 381 MB used / 1 GB limit.

  21. cben commented on Sep 7, 2015

    @cben
    OwnerAuthor

    More interesting: a deploy with --enable-jenkins succeeded, on small gear!

    I now have a https://jenkins-mathdown.rhcloud.com, and a Jenkins Client cartridge in the gear.
    On create, it seems the target app was created first (which was fast), then the build was sent to Jenkins, which created a new app for building (TARGETbldr), copied source there, built, copied result to the target app, and only then it started serving.
    [https://developers.openshift.com/en/managing-continuous-integration.html]

    On git push, a similarly complicated dance happens and the build claimed success; however the git push timed out, and I don't see the effect).

    => I think I'll do both. Jenkins, small for the staging and small.highcpu (no jenkins) for the prod.

  22. cben commented on Sep 8, 2015

    @cben
    OwnerAuthor

    Nah, this morning I found the Jenkins instance unresponsive.
    After destroying the jenkins app, creating with --enable-jenkins timed out.
    I then tried first creating the jenkins app, then creating mathdown with --enable-jenkins — also timed out but the app was created.
    Documenting it, but giving up.


    However I now tried something I should have done from the beginning:
    creating empty app (without --from-code) [49sec], then git push -f [1m19sec] — worked!
    (an empty app gets some initial scaffolding; most tutorials involving an empty app recommend git pull/merge from it, but I didn't want to pollute my history just to deploy an existing version. For some reason I never tried push -f to replace OpenShift's initial commit...)

    => The new both strategies I'm gonna do is use the empty create + push for staging, and small.highcpu gears for prod.

  23. cben commented on Sep 8, 2015

    @cben
    OwnerAuthor

    flipping DNS to https://prod-mathdown.rhcloud.com:

    • changing DNSimple
    • removing aliases from mathdown468cf5aaf3prod-cben.rhcloud.com (https to old DNS will no longer work but http will)
    • ./deployment/tls-certs-startcom/rhc-set-certs.sh 'prod -n mathdown' ~/StartSSL/my-private-decrypted.key
    • some time later destroy mathdown468cf5aaf3prod (and cben "domain").
  24. cben commented on Sep 8, 2015

    @cben
    OwnerAuthor

    eh, removing aliases means http stopped working too (no longer routed to the right gear).
    but removing only SSL alias would not be enough, prevents adding alias on new app :-(

  25. cben commented on Sep 8, 2015

    @cben
    OwnerAuthor

    PHEW. CLOSING.
    Might re-open if it happens again (staging is using small gears in hope I'll catch problems there before they hit prod)

  26. cben commented on Sep 10, 2015

    @cben
    OwnerAuthor

    Hmm.
    Load tested staging (2 small gears) twice using https://loader.io.
    Started misbehaving (latency AND errors) at ~1600 "clients/sec" but I'm not sure they actually mean 1600 https reqs/sec ("clients" is climbing, bandwidth stays ~constant?):
    https://loader.io/reports/946e577dd04b776c8ae541c7c66e37dc/results/c59a6f817f6af8f1ac59b6e6074ac076#connections
    Good news is that it tried to scale (not fast enough but this load climbs unrealisticially fast), bad news is first time it failed with 504:

    ==> app-root/logs/haproxy_ctld.log <==
    I, [2015-09-10T03:08:07.646220 #505490]  INFO -- : add-gear - exit_code: 1  output: The add-gear request failed with http_code: 504
    
    ==> app-root/logs/haproxy.log <==
    [WARNING] 252/030820 (350021) : config : log format ignored for proxy 'stats' since it has no log address.
    [WARNING] 252/030820 (350021) : config : log format ignored for proxy 'express' since it has no log address.
    [WARNING] 252/030820 (159622) : Stopping proxy stats in 0 ms.
    [WARNING] 252/030820 (159622) : Stopping proxy express in 0 ms.
    [WARNING] 252/030820 (159622) : Proxy stats stopped (FE: 2 conns, BE: 0 conns).
    [WARNING] 252/030820 (159622) : Proxy express stopped (FE: 1618 conns, BE: 116043 conns).
    

    Second time it scaled successfully, and scaled down 10min later:

    ==> app-root/logs/haproxy_ctld.log <==
    I, [2015-09-10T03:19:28.211013 #505490]  INFO -- : add-gear - capacity: 96.875% gear_count: 2 sessions: 31 up_thresh: 90.0%
    
    ==> app-root/logs/haproxy.log <==
    [WARNING] 252/032144 (401660) : config : log format ignored for proxy 'stats' since it has no log address.
    [WARNING] 252/032144 (401660) : config : log format ignored for proxy 'express' since it has no log address.
    [WARNING] 252/032144 (350021) : Stopping proxy stats in 0 ms.
    [WARNING] 252/032144 (350021) : Stopping proxy express in 0 ms.
    [WARNING] 252/032144 (350021) : Proxy stats stopped (FE: 1 conns, BE: 0 conns).
    [WARNING] 252/032144 (350021) : Proxy express stopped (FE: 707 conns, BE: 82985 conns).
    [WARNING] 252/032146 (401660) : Server express/local-gear is DOWN for maintenance.
    [WARNING] 252/032146 (401660) : Server express/local-gear is UP (leaving maintenance).
    
    ==> app-root/logs/haproxy_ctld.log <==
    I, [2015-09-10T03:21:46.239648 #505490]  INFO -- : add-gear - exit_code: 0  output: 
    
    ==> app-root/logs/haproxy.log <==
    [WARNING] 252/032149 (401765) : config : log format ignored for proxy 'stats' since it has no log address.
    [WARNING] 252/032149 (401765) : config : log format ignored for proxy 'express' since it has no log address.
    [WARNING] 252/032149 (401660) : Stopping proxy stats in 0 ms.
    [WARNING] 252/032149 (401660) : Stopping proxy express in 0 ms.
    [WARNING] 252/032149 (401660) : Proxy stats stopped (FE: 2 conns, BE: 0 conns).
    [WARNING] 252/032149 (401660) : Proxy express stopped (FE: 0 conns, BE: 0 conns).
    
    ==> app-root/logs/haproxy_ctld.log <==
    I, [2015-09-10T03:29:31.434609 #505490]  INFO -- : remove-gear - capacity: 0.0% gear_count: 3 sessions: 0 remove_thresh: 46.5%
    
    ==> app-root/logs/haproxy.log <==
    [WARNING] 252/032937 (401765) : Server express/gear-55f12f0889f5cfc3c3000144-mathdown is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 1ms. 1 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
    [WARNING] 252/033012 (401765) : Stopping proxy stats in 0 ms.
    [WARNING] 252/033012 (401765) : Stopping proxy express in 0 ms.
    [WARNING] 252/033012 (401765) : Proxy stats stopped (FE: 1 conns, BE: 0 conns).
    [WARNING] 252/033012 (401765) : Proxy express stopped (FE: 5 conns, BE: 27 conns).
    [WARNING] 252/033012 (428636) : config : log format ignored for proxy 'stats' since it has no log address.
    [WARNING] 252/033012 (428636) : config : log format ignored for proxy 'express' since it has no log address.
    
    ==> app-root/logs/haproxy_ctld.log <==
    I, [2015-09-10T03:30:15.244630 #505490]  INFO -- : remove-gear - exit_code: 0  output: 
    

    The only thing here I don't understand is the brief "express/local-gear is DOWN for maintenance"...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions