Can no longer update - git option `short` not locally supported when called from launcher


(PJH) #1

From the command line:

[root@desktop discourse]# ./launcher rebuild app
error: unknown option `short`
usage: git symbolic-ref [options] name [ref]

    -q, --quiet           be quiet
    -m <reason>           reason of the update

Stopping old container
57ce433f92b240946d64082646755a6159275c3e45dae43121a5b6079c724e94
Calculated ENV: -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=3 -e UNICORN_SIDEKIQS=1 -e RUBY_GC_MALLOC_LIMIT=40000000 -e RUBY_HEAP_MIN_SLOTS=800000 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e HOME=/root -e iUNICORN_WORKERS=6 -e DISCOURSE_DEVELOPER_EMAILS=<elided>
cd /pups && git pull && /pups/bin/pups --stdin
fatal: unable to access 'https://github.com/SamSaffron/pups.git/': Could not resolve host: github.com
e7f5374c45688d4b770600c5243ea4aca3306838fcc67156c84556a2daa99404
FAILED TO BOOTSTRAP

Digging…

[root@desktop discourse]# grep short *
launcher:      if [ "$(git symbolic-ref --short HEAD)" == "master" ]; then
[root@desktop discourse]# git symbolic-ref --short HEAD
error: unknown option `short`
usage: git symbolic-ref [options] name [ref]

    -q, --quiet           be quiet
    -m <reason>           reason of the update

[root@desktop discourse]# yum info git
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
epel/metalink                                                                                                                                                                |  22 kB     00:00     
 * base: centos.mirroring.pulsant.co.uk
 * epel: mirror.serverbeheren.nl
 * extras: mirror.simwood.com
 * rpmforge: mirrors.ircam.fr
 * updates: mirror.as29550.net
adobe-linux-x86_64                                                                                                                                                           |  951 B     00:00     
base                                                                                                                                                                         | 3.7 kB     00:00     
epel                                                                                                                                                                         | 4.1 kB     00:00     
epel/primary_db                                                                                                                                                              | 6.4 MB     00:01     
extras                                                                                                                                                                       | 3.4 kB     00:00     
rpmforge                                                                                                                                                                     | 1.9 kB     00:00     
updates                                                                                                                                                                      | 3.4 kB     00:00     
virtualbox                                                                                                                                                                   |  951 B     00:00     
Installed Packages
Name        : git
Arch        : x86_64
Version     : 1.7.1
Release     : 3.el6_4.1
Size        : 15 M
Repo        : installed
From repo   : base
Summary     : Fast Version Control System
URL         : http://git-scm.com/
License     : GPLv2
Description : Git is a fast, scalable, distributed revision control system with an
            : unusually rich command set that provides both high-level operations
            : and full access to internals.
            : 
            : The git rpm installs the core tools with minimal dependencies.  To
            : install all git packages, including tools for integrating with other
            : SCMs, install the git-all meta-package.

[root@desktop discourse]# 

(Régis Hanol) #2

1.7.1 is ancient. Git is currently at 2.1.3.


(PJH) #3

So I’m back to not being able to host DC.

Fair enough. :shrug:


(Robin Ward) #4

Is it impossible for you to update git?


(PJH) #5

Not impossible, no. But it’s non-standard for Centos, and even if I do, what next will need to be updated out-of-band?


(Sam Saffron) #6

this looks totally unrelated to git, git runs from inside Docker so we have the right version, looks like DNS is bust in your docker setup OR you have temporary issue contacting github from local

Try

docker run -it --rm samsaffron/discourse bin/bash
% cd /pups && git pull

if you are unable to upgrade git you can always just do the old way

./launcher destroy app
./launcher bootsrap app
./launcher start app

(PJH) #7

Manually digging (and curling) for github.com (and that URL in particular) worked fine - I have no idea what that error’s doing there, nor what its problem is.


(PJH) #8

Nope - no go:

[root@desktop discourse]# ./launcher destroy app
destroying container cids/app.cid
57ce433f92b240946d64082646755a6159275c3e45dae43121a5b6079c724e94
57ce433f92b240946d64082646755a6159275c3e45dae43121a5b6079c724e94
[root@desktop discourse]# ./launcher bootstrap app
Calculated ENV: -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=3 -e UNICORN_SIDEKIQS=1 -e RUBY_GC_MALLOC_LIMIT=40000000 -e RUBY_HEAP_MIN_SLOTS=800000 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e HOME=/root -e iUNICORN_WORKERS=6 -e DISCOURSE_DEVELOPER_EMAILS=<elided>
cd /pups && git pull && /pups/bin/pups --stdin
fatal: unable to access 'https://github.com/SamSaffron/pups.git/': Could not resolve host: github.com
e9f1657598d107bc64d3b2c822254a35924e645f358640f2cc5cc8e59dc44bc6
FAILED TO BOOTSTRAP
[root@desktop discourse]# dig github.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6 <<>> github.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41183
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;github.com.                    IN      A

;; ANSWER SECTION:
github.com.             3       IN      A       192.30.252.130

;; Query time: 31 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Nov 21 09:07:24 2014
;; MSG SIZE  rcvd: 44

[root@desktop discourse]# curl https://github.com/SamSaffron/pups.git/ -Li | head -n50
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
178   178  178   178    0     0    317      0 --:--:-- --:--:-- --:--:--  1575HTTP/1.1 301 Moved Permanently
Server: GitHub.com
Date: Fri, 21 Nov 2014 09:07:49 GMT
Content-Type: text/html
Content-Length: 178
Location: https://github.com/SamSaffron/pups/
Vary: Accept-Encoding
X-Served-By: bc4c952d089501afbfc8f7ff525da31c

HTTP/1.1 200 OK
Server: GitHub.com
Date: Fri, 21 Nov 2014 09:07:49 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Status: 200 OK
X-XSS-Protection: 1; mode=block
X-Frame-Options: deny
Content-Security-Policy: default-src *; script-src assets-cdn.github.com collector-cdn.github.com; object-src assets-cdn.github.com; style-src 'self' 'unsafe-inline' 'unsafe-eval' assets-cdn.github.com; img-src 'self' data: assets-cdn.github.com identicons.github.com www.google-analytics.com collector.githubapp.com *.githubusercontent.com *.gravatar.com *.wp.com; media-src 'none'; frame-src 'self' render.githubusercontent.com gist.github.com www.youtube.com player.vimeo.com checkout.paypal.com; font-src assets-cdn.github.com; connect-src 'self' ghconduit.com:25035 live.github.com uploads.github.com www.google-analytics.com s3.amazonaws.com
Cache-Control: no-cache
Vary: X-PJAX
X-UA-Compatible: IE=Edge,chrome=1
Set-Cookie: logged_in=no; domain=.github.com; path=/; expires=Tue, 21-Nov-2034 09:07:49 GMT; secure; HttpOnly
Set-Cookie: _gh_sess=eyJzZXNzaW9uX2lkIjoiZGE2ZDdjYjNiNTgwN2ExNjA4NjY5OTIzZjJmZGIyOTUiLCJzcHlfcmVwbyI6IlNhbVNhZmZyb24vcHVwcyIsInNweV9yZXBvX2F0IjoxNDE2NTYwODY5LCJfY3NyZl90b2tlbiI6IkdLb1owWTYvYVNOQzhzOVIrVVNxcnJkZ1gxODExbkV1QUlBZkR5bHIzRUU9In0%3D--acfe03bcf93291e6cad59653ebffd7bf2e555a72; path=/; secure; HttpOnly
X-Request-Id: 59c91dc2f376ecd86ad1d9339c326cab
X-Runtime: 0.043263
X-Rack-Cache: miss
X-GitHub-Request-Id: 522B81E0:5F9A:21754703:546F00E5
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
X-Content-Type-Options: nosniff
Vary: Accept-Encoding
X-Served-By: ef97014f01ea59c1ef337fe51a4d0331





<!DOCTYPE html>
<html lang="en" class="">
  <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#">
    <meta charset='utf-8'>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Language" content="en">
    
    
    <title>SamSaffron/pups · GitHub</title>
    <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
    <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
    <link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-114.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114.png">
    <link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-144.png">
5474   178  5474  5474    0     0   7667      0 --:--:-- --:--:-- --:--:--  7667
curl: (23) Failed writing body (782 != 1370)
[root@desktop discourse]# 

(PJH) #9

Update - have upgraded git to 1.7.12.4, so I no longer get the unknown option 'short'error, but rebuild is still having DNS problems…

[root@desktop discourse]# ./launcher rebuild app
Updating discourse docker
Already up-to-date.
Calculated ENV: -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=3 -e UNICORN_SIDEKIQS=1 -e RUBY_GC_MALLOC_LIMIT=40000000 -e RUBY_HEAP_MIN_SLOTS=800000 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e HOME=/root -e iUNICORN_WORKERS=6 -e DISCOURSE_DEVELOPER_EMAILS=<elided>
cd /pups && git pull && /pups/bin/pups --stdin
fatal: unable to access 'https://github.com/SamSaffron/pups.git/': Could not resolve host: github.com
ff8851c130efc73afc69b3fccc4aa4df29ec0527007cce0def167eebc0f5b781
FAILED TO BOOTSTRAP

(Sam Saffron) #10

that is inside docker …

you can pass in an override if you need in docker opts