VMWare ESXi 6.5をUpdate 1へアップデートする

昨日出たばかりのESXi 6.5 Update 1を入れてみる。

VMware ESXi 6.5 Update 1 Release Notes

SATA接続のSSDが遅い問題が直ればいいんだけど・・・。

# esxcli software sources profile list -d /vmfs/volumes/datastore/update-from-esxi6.5-6.5_update01.zip
Name                              Vendor        Acceptance Level
--------------------------------  ------------  ----------------
ESXi-6.5.0-20170701001s-no-tools  VMware, Inc.  PartnerSupported
ESXi-6.5.0-20170702001-standard   VMware, Inc.  PartnerSupported
ESXi-6.5.0-20170701001s-standard  VMware, Inc.  PartnerSupported
ESXi-6.5.0-20170702001-no-tools   VMware, Inc.  PartnerSupported

# esxcli software profile update -p ESXi-6.5.0-20170702001-standard -d /vmfs/volumes/datastore/update-from-esxi6.5-6.5_update01.zip
Update Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: VMW_bootbank_ehci-ehci-hcd_1.0-4vmw.650.0.14.5146846, ...(snip)..., VMware_locker_tools-light_6.5.0-0.23.5969300
   VIBs Removed: VMW_bootbank_ehci-ehci-hcd_1.0-3vmw.650.0.0.4564106, ...(snip)..., VMware_locker_tools-light_6.5.0-0.0.4564106
   VIBs Skipped: VMW_bootbank_ata-libata-92_3.00.9.2-16vmw.650.0.0.4564106, ...(snip)..., VMware_bootbank_rste_2.0.2.0088-4vmw.650.0.0.4564106

今回はアップグレードに10分ちょい掛かりました。

どうやら今のところSSDにアクセスしても快調に動いてます!やったね!!!

JIRAのスプリントヘルスガジェットが表示できない

「リクエストしたボードを表示できません。ボードが存在しないかまたは表示する権限がありません。」というエラーになってしまいます。

f:id:gozuk16:20170721204749p:plain

調べたら不具合らしい。

ダッシュボード上で「スプリントヘルスガジェット」及び「スプリントガジェット内の残り日数」が正しく表示されない - Atlassian Documentation

ここに乗っているとおり、英語に設定してからガジェットを登録し直したらちゃんと表示されました。
が、日本語設定でガジェットの設定を開いて保存すると再発する。

毎回設定を変えるのは面倒なのでデフォルトの管理者ユーザを英語設定にしてそちらでメンテすることにしたけど・・・。 早く直って欲しいぞ。

バグチケットは報告されているようなのでvoteしておきました。

[JSWSERVER-15001] Can't add Sprint Health Gadget / Days Remaining in Sprint Gadget in Japanese setting - Atlassian JIRA

MacでGoのクロスコンパイルを出来るようにする

ぐぐる--cross-compile-common を付けて brew install しなさいと出るけど引数変わってた。

$ brew install go --cross-compile-common
Warning: go: this formula has no --cross-compile-common option so it will be ignored!
==> Downloading https://homebrew.bintray.com/bottles/go-1.8.3.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring go-1.8.3.yosemite.bottle.tar.gz
==> Using the sandbox
==> Caveats
A valid GOPATH is required to use the `go get` command.
If $GOPATH is not specified, $HOME/go will be used by default:
  https://golang.org/doc/code.html#GOPATH

You may wish to add the GOROOT-based install location to your PATH:
  export PATH=$PATH:/usr/local/opt/go/libexec/bin
==> Summary
🍺  /usr/local/Cellar/go/1.8.3: 7,035 files, 282.0MB


$ brew install go --with-cc-common
Warning: go: this formula has no --with-cc-common option so it will be ignored!
==> Downloading https://homebrew.bintray.com/bottles/go-1.8.3.yosemite.bottle.tar.gz
Already downloaded: /Users/gozu/Library/Caches/Homebrew/go-1.8.3.yosemite.bottle.tar.gz
==> Pouring go-1.8.3.yosemite.bottle.tar.gz
==> Using the sandbox
==> Caveats
A valid GOPATH is required to use the `go get` command.
If $GOPATH is not specified, $HOME/go will be used by default:
  https://golang.org/doc/code.html#GOPATH

You may wish to add the GOROOT-based install location to your PATH:
  export PATH=$PATH:/usr/local/opt/go/libexec/bin
==> Summary
🍺  /usr/local/Cellar/go/1.8.3: 7,035 files, 282.0MB

VMWare ESXi 5.5を6.5へアップデートする

↓ここを見ながらやってみる

qiita.com

準備

my vmware(https://my.vmware.com/group/vmware/home) からZIPファイルをダウンロードしてESXiホストへ転送する

$ scp -p update-from-esxi6.0-6.0_update02.zip root@vmhost:/vmfs/volumes/datastore/update/.

5.5→6.0へのアップデート

VM全部落としてメンテナンスモードへ

まずはバージョンの確認

# esxcli system version get
   Product: VMware ESXi
   Version: 5.5.0
   Build: Releasebuild-1331820
   Update: 0

アップデート

# esxcli software profile update -p ESXi-6.0.0-20160302001-standard -d update-from-esxi6.0-6.0_update02.zip
 [MetadataDownloadError]
 Could not download from depot at zip:/var/log/vmware/update-from-esxi6.0-6.0_update02.zip?index.xml, skipping (('zip:/var/log/vmware/update-from-esxi6.0-6.0_update02.zip?index.xml', '', "Error extracting index.xml from /var/log/vmware/update-from-esxi6.0-6.0_update02.zip: [Errno 2] No such file or directory: '/var/log/vmware/update-from-esxi6.0-6.0_update02.zip'"))
        url = zip:/var/log/vmware/update-from-esxi6.0-6.0_update02.zip?index.xml
 Please refer to the log file for more details.

よくわからんエラーがでたが、どうやら esxcli コマンドには絶対パスを与える必要があるらしい。
ついでに最新らしいupdate03でやってみることにした。

# esxcli software sources profile list -d /vmfs/volumes/datastore/update/update-from-esxi6.0-6.0_update03.zip
Name                              Vendor        Acceptance Level
--------------------------------  ------------  ----------------
ESXi-6.0.0-20170202001-standard   VMware, Inc.  PartnerSupported
ESXi-6.0.0-20170201001s-standard  VMware, Inc.  PartnerSupported
ESXi-6.0.0-20170201001s-no-tools  VMware, Inc.  PartnerSupported
ESXi-6.0.0-20170202001-no-tools   VMware, Inc.  PartnerSupported

# esxcli software profile update -p ESXi-6.0.0-20170202001-standard -d /vmfs/volumes/datastore/update/update-from-esxi6.0-6.0_update03.zip
Update Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: VMWARE_bootbank_mtip32xx-native_3.8.5-1vmw.600.0.0.2494585, ...(snip)..., VMware_locker_tools-light_6.0.0-3.57.5050593
   VIBs Removed: VMware_bootbank_ata-pata-amd_0.3.10-3vmw.550.0.0.1331820, ...(snip)..., VMware_locker_tools-light_5.5.0-0.0.1331820
   VIBs Skipped:

5分位で適用できた!

# esxcli system version get
   Product: VMware ESXi
   Version: 6.0.0
   Build: Releasebuild-5050593
   Update: 3
   Patch: 57

ここで、一応仮想マシンが使えるか確認する。 VMFSはもともと5だったので特になにもせずにそのまま。

6.0→6.5へのアップデート

# esxcli software sources profile list -d  /vmfs/volumes/datastore/update/ESXi650-201704001.zip
Name                             Vendor        Acceptance Level
-------------------------------  ------------  ----------------
ESXi-6.5.0-20170404001-standard  VMware, Inc.  PartnerSupported
ESXi-6.5.0-20170404001-no-tools  VMware, Inc.  PartnerSupported

# esxcli software profile update -p ESXi-6.5.0-20170404001-standard -d /vmfs/volumes/datastore/update/ESXi650-201704001.zip

Update Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: VMW_bootbank_ata-libata-92_3.00.9.2-16vmw.650.0.0.4564106, ...(snip)..., VMware_locker_tools-light_6.5.0-0.0.4564106
   VIBs Removed: VMWARE_bootbank_mtip32xx-native_3.8.5-1vmw.600.0.0.2494585, ...(snip)..., VMware_bootbank_xhci-xhci_1.0-3vmw.600.2.52.4600944, VMware_locker_tools-light_6.0.0-3.57.5050593
   VIBs Skipped: VMW_bootbank_qlnativefc_2.1.30.0-11vmw.650.0.0.4564106, VMW_bootbank_sata-ahci_3.0-22vmw.650.0.0.4564106, VMware_bootbank_lsu-hp-hpsa-plugin_2.0.0-3vmw.650.0.0.4564106

# esxcli system version get
   Product: VMware ESXi
   Version: 6.5.0
   Build: Releasebuild-5310538
   Update: 0
   Patch: 19

今度はいとも簡単にできたー。

データストアについてはVMFS5からVMFS6へのアップデートは出来ないらしいので取り敢えずそのままです。

Ubuntu 14.04で2系のgitを使う

gozuk16.hatenablog.com

上の記事に続いて、gitが古いので新しくしておく

$ sudo add-apt-repository ppa:git-core/ppa
 The most current stable version of Git for Ubuntu.

For release candidates, go to https://launchpad.net/~git-core/+archive/candidate .
 More info: https://launchpad.net/~git-core/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpm1h_rrd0/secring.gpg' created
gpg: keyring `/tmp/tmpm1h_rrd0/pubring.gpg' created
gpg: requesting key E1DF1F24 from hkp server keyserver.ubuntu.com
gpgkeys: key E1DD270288B4E6030699E45FA1715D88E1DF1F24 can't be retrieved
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

$ sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --keyserver-options http-proxy=http://proxy.example.com:8080/ --recv-keys E1DF1F24
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.kL0BZJ0wMB --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://pgp.mit.edu:80 --keyserver-options http-proxy=http://proxy.example.com:8080/ --recv-keys E1DF1F24
gpg: requesting key E1DF1F24 from hkp server pgp.mit.edu
gpg: key E1DF1F24: public key "Launchpad PPA for Ubuntu Git Maintainers" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

$ sudo aptitude update
$ sudo aptitude safe-upgrade

出来た

$ git version
git version 2.13.0

Jenkinsのlinuxスレーブが起動しなくなったのでJavaを上げた

今日はやたらyak shavingした日なのでブログに残しておこう。( TДT)

いつの間にかLinux Slaveが起動しなくなってた

Jenkinsの画面からノードを選択して手動で起動してみる

[06/29/17 19:31:05] [SSH] スレーブのプロセスを開始: cd "/home/jenkins" && java  -jar slave.jar

<===[JENKINS REMOTING CAPACITY]===>channel started

Slave JVM has not reported exit code. Is it still running?
[06/29/17 19:31:09] Launch failed - cleaning up connection
[06/29/17 19:31:09] [SSH] コネクション終了
ERROR: Connection terminated
java.io.EOFException
    at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2638)
    at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3113)
    at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:853)
    at java.io.ObjectInputStream.<init>(ObjectInputStream.java:349)
    at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
    at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
    at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:59)
Caused: java.io.IOException: Unexpected termination of the channel
    at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:73)

あらら? Slave JVM has not reported exit code. Is it still running? をぐぐってみるとどうやらJavaのバージョンに依存するエラーらしい。今まではJava7で動いていたのがだめになったんだろうか・・・

Java8にあげてみる

ubuntu 14.04なのでPPAで入れることにしました。

$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:webupd8team/ppa
 Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK7 / JDK8 / JDK9). There are no actual Java files in this PPA.

Important -> Why Oracle Java 7 And 6 Installers No Longer Work: http://www.webupd8.org/2017/06/why-oracle-java-7-and-6-installers-no.html

More info (and Ubuntu installation instructions):
- for Oracle Java 7: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
- for Oracle Java 8: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html

Debian installation instructions:
- Oracle Java 7: http://www.webupd8.org/2012/06/how-to-install-oracle-java-7-in-debian.html
- Oracle Java 8: http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html

Oracle Java 9 (for both Ubuntu and Debian): http://www.webupd8.org/2015/02/install-oracle-java-9-in-ubuntu-linux.html

For JDK9, the PPA uses standard builds from: http://jdk.java.net/9/ (and not the Jigsaw builds!).

Important!!! For now, you should continue to use Java 8 because Oracle Java 9 is available as an early access release! You should only use Oracle Java 9 if you explicitly need it, because it may contain bugs and it might not include the latest security patches! Also, some Java options were removed in JDK9, so you may encounter issues with various Java apps. More information and installation instructions (Ubuntu / Linux Mint / Debian): http://www.webupd8.org/2015/02/install-oracle-java-9-in-ubuntu-linux.html
 More info: https://launchpad.net/~webupd8team/+archive/ubuntu/java
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmp7j4t0u3c/secring.gpg' created
gpg: keyring `/tmp/tmp7j4t0u3c/pubring.gpg' created
gpg: requesting key EEA14886 from hkp server keyserver.ubuntu.com
gpgkeys: key 7B2C3B0889BF5709A105D03AC2518248EEA14886 can't be retrieved
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

相変わらずプロキシ環境下で鍵をインストールするところで失敗する・・・。

gozuk16.hatenablog.com

自分の記事を参考に鍵だけインストー

$ sudo apt-key adv --keyserve
[http://gozuk16.hatenablog.com/entry/2016/03/24/144400:embed:cite]

r hkp://pgp.mit.edu:80 --keyserver-options http-proxy=http://proxy.example.com:8080/ --recv-keys EEA14886

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.JJ3XwYe2dV --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://pgp.mit.edu:80 --keyserver-options http-proxy=http://proxy.example.com:8080/ --recv-keys EEA14886
gpg: requesting key EEA14886 from hkp server pgp.mit.edu
gpg: key EEA14886: public key "Launchpad VLC" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

更新してインストー

$ sudo aptitude update
$ sudo aptitude install oracle-java8-installer

$ sudo java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
root@ci-slave-linux1:/etc/apt/sources.list.d# ls
webupd8team-java-trusty.list

直ったー

[06/29/17 19:49:45] [SSH] スレーブのプロセスを開始: cd "/home/jenkins" && java  -jar slave.jar
<===[JENKINS REMOTING CAPACITY]===>channel started
Slave.jar version: 3.7
This is a Unix agent
Evacuated stdout

Agent successfully connected and online

ubuntu で do-release-upgrade が失敗する

proxy環境下にあると以下のようなエラーがしばらく繰り返して失敗します。

0% [ヘッダの待機中です]
0% [ヘッダの待機中です]
0% [ヘッダの待機中です]
エラー http://security.ubuntu.com/ubuntu/ xenial-security/main linux-headers-4.4.0-71 all 4.4.0-71.92
  接続失敗 [IP: 192.168.0.1 8080]
0% [ヘッダの待機中です]

どうやらProxyがおそすぎてタイムアウトするらしいです。

まずは速いミラーに変えます。 /etc/apt/source.list/etc/apt/source.list.distUpgradeを日本の早そうなミラーに書き換えました。

launchpad.net

それでもでかいファイルは駄目っぽいので、手動で落として /var/cache/apt/archives に放り込んだら進みだした。

まったくもう。まともなプロキシにするだけでどれだけ生産性が向上することやら。(´Д`)ハァ…

参考

srad.jp