cgeo / cgeo-executor

cgeo docker executor for Jenkins slave
1 stars 3 forks source link

hub.docker.io build image which doesn't work #2

Open kumy opened 8 years ago

kumy commented 8 years ago

Latest build from new executors fails with errors like:

22:41:37  * What went wrong:
22:41:37  A problem occurred configuring project ':main'.
22:41:37  > Could not resolve all dependencies for configuration ':main:_nojitRcCompile'.
22:41:37     > Could not find com.android.support:appcompat-v7:20.0.0.
22:41:37       Searched in the following locations:
22:41:37           https://jcenter.bintray.com/com/android/support/appcompat-v7/20.0.0/appcompat-v7-20.0.0.pom
22:41:37           https://jcenter.bintray.com/com/android/support/appcompat-v7/20.0.0/appcompat-v7-20.0.0.jar
22:41:37           file:/opt/android-sdk-linux/extras/android/m2repository/com/android/support/appcompat-v7/20.0.0/appcompat-v7-20.0.0.pom
22:41:37           file:/opt/android-sdk-linux/extras/android/m2repository/com/android/support/appcompat-v7/20.0.0/appcompat-v7-20.0.0.jar
22:41:37           file:/opt/android-sdk-linux/extras/google/m2repository/com/android/support/appcompat-v7/20.0.0/appcompat-v7-20.0.0.pom
22:41:37           file:/opt/android-sdk-linux/extras/google/m2repository/com/android/support/appcompat-v7/20.0.0/appcompat-v7-20.0.0.jar
22:41:37       Required by:
22:41:37           cgeo continuous integration:main:unspecified

The docker image doesn't include:

From logfile:

Installing Local Maven repository for Support Libraries, revision 26
Failed to rename directory /opt/android-sdk-linux/extras/android/m2repository to /opt/android-sdk-linux/temp/ExtraPackage.old01.
Failed to create directory /opt/android-sdk-linux/extras/android/m2repository
[...]
 Installing Android Support Library, revision 23.2
Failed to rename directory /opt/android-sdk-linux/extras/android/support to /opt/android-sdk-linux/temp/ExtraPackage.old01.
Failed to create directory /opt/android-sdk-linux/extras/android/support

Inside the docker instance, the directories are empty

# grep "opt/android-sdk-linux/extras/" /media/4dd98527-eeae-4906-bea6-8a31c668e156/temp/docker.tar.list
drwxr-xr-x 1000/1000         0 2016-02-26 18:07 opt/android-sdk-linux/extras/
drwxr-xr-x 1000/1000         0 2016-02-26 18:07 opt/android-sdk-linux/extras/android/
drwxr-xr-x 1000/1000         0 2016-02-26 18:07 opt/android-sdk-linux/extras/android/m2repository/
drwxr-xr-x 1000/1000         0 2016-02-26 18:07 opt/android-sdk-linux/extras/android/support/
drwxr-xr-x 1000/1000         0 2016-01-07 14:42 opt/android-sdk-linux/extras/google/
drwxr-xr-x 1000/1000         0 2016-03-03 20:38 opt/android-sdk-linux/extras/google/m2repository/
drwxr-xr-x 1000/1000         0 2016-01-07 14:42 opt/android-sdk-linux/extras/google/m2repository/com/
drwxr-xr-x 1000/1000         0 2016-01-07 14:42 opt/android-sdk-linux/extras/google/m2repository/com/google/
drwxr-xr-x 1000/1000         0 2016-01-07 14:42 opt/android-sdk-linux/extras/google/m2repository/com/google/android/
drwxr-xr-x 1000/1000         0 2016-01-07 14:42 opt/android-sdk-linux/extras/google/m2repository/com/google/android/gms/
drwxr-xr-x 1000/1000         0 2016-01-07 14:42 opt/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services/
drwxr-xr-x 1000/1000         0 2016-01-07 14:42 opt/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services/3.1.36/
-rw-r--r-- 1000/1000    710357 2016-01-07 14:42 opt/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services/3.1.36/play-services-3.1.36.aar
-rw-r--r-- 1000/1000        33 2016-01-07 14:42 opt/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services/3.1.36/play-services-3.1.36.aar.md5
-rw-r--r-- 1000/1000        41 2016-01-07 14:42 opt/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services/3.1.36/play-services-3.1.36.aar.sha1
-rw-r--r-- 1000/1000       656 2016-01-07 14:42 opt/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services/3.1.36/play-services-3.1.36.pom
-rw-r--r-- 1000/1000        33 2016-01-07 14:42 opt/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services/3.1.36/play-services-3.1.36.pom.md5
-rw-r--r-- 1000/1000        41 2016-01-07 14:42 opt/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services/3.1.36/play-services-3.1.36.pom.sha1
drwxr-xr-x 1000/1000         0 2016-01-07 14:42 opt/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services/3.1.59/
kumy commented 8 years ago

As a workaround, I've manually logged into docker image, installed missing libs then run from that

samueltardieu commented 8 years ago

This may be a bug while generating the image, I'll force a rebuild (I built a local version from the same sources and they seem just fine).

kumy commented 8 years ago

Same error with that build. @samueltardieu someone at work proposed such change, could you please give it a try?

kumy commented 8 years ago

Got the same error while building the image locally

  Failed to rename directory /opt/android-sdk-linux/extras/android/m2repository to /opt/android-sdk-linux/temp/ExtraPackage.old01.
  Failed to create directory /opt/android-sdk-linux/extras/android/m2repository
Installing Archives:
  Preparing to install archives
  Downloading SDK Platform Android 5.1.1, API 22, revision 2
  Installing SDK Platform Android 5.1.1, API 22, revision 2
    Installed SDK Platform Android 5.1.1, API 22, revision 296%)
  Downloading SDK Platform Android 4.4.2, API 19, revision 4
  Installing SDK Platform Android 4.4.2, API 19, revision 4
    Installed SDK Platform Android 4.4.2, API 19, revision 497%)
  Downloading Google APIs, Android API 23, revision 1
  Installing Google APIs, Android API 23, revision 1
    Installed Google APIs, Android API 23, revision 189%)
  Downloading Local Maven repository for Support Libraries, revision 26
  Installing Local Maven repository for Support Libraries, revision 26
  Failed to rename directory /opt/android-sdk-linux/extras/android/m2repository to /opt/android-sdk-linux/temp/ExtraPackage.old01.
  Failed to create directory /opt/android-sdk-linux/extras/android/m2repository
  Downloading Android Support Library, revision 23.2
  Installing Android Support Library, revision 23.2
  Failed to rename directory /opt/android-sdk-linux/extras/android/support to /opt/android-sdk-linux/temp/ExtraPackage.old01.
  Failed to create directory /opt/android-sdk-linux/extras/android/support
  Downloading Google APIs, Android API 22, revision 1
  Installing Google APIs, Android API 22, revision 1
    Installed Google APIs, Android API 22, revision 189%)
  Downloading Google APIs Intel x86 Atom_64 System Image, Google Inc. API 23, revision 12
  Installing Google APIs Intel x86 Atom_64 System Image, Google Inc. API 23, revision 12
    Installed Google APIs Intel x86 Atom_64 System Image, Google Inc. API 23, revision 1299%)
    Updated ADB to support the USB devices declared in the SDK add-ons.
    Stopping ADB server succeeded.
    Starting ADB server succeeded.
  Done. 5 packages installed.
 ---> 3539967e0e72
kumy commented 8 years ago

df -h as requested

Filesystem             Size  Used Avail Use% Mounted on
rootfs                1008G  393G  564G  42% /
none                  1008G  393G  564G  42% /
tmpfs                  2.0G     0  2.0G   0% /dev
tmpfs                  2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/mapper/RAID-4T    3.6T  3.0T  629G  83% /srv
/dev/mapper/DATA-DOWN 1008G  393G  564G  42% /etc/hosts
shm                     64M     0   64M   0% /dev/shm
tmpfs                  2.0G     0  2.0G   0% /proc/kcore
tmpfs                  2.0G     0  2.0G   0% /proc/timer_stats
kumy commented 8 years ago

It seem to be a problem with hardlinks while moving directory by the android sdk installer which isn't supported by aufs. I was on aufs. I'll test with btrfs.

samueltardieu commented 8 years ago

So we can close this one, right?

kumy commented 8 years ago

As images generated at hub docker level are "wrong", I would leave it open until something is fixed. We only have the reason and a workaround (build locally without aufs Storage Driver), no?