Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run "flask" example on Ubuntu 18.04 #516

Open
mkpankov opened this issue Jun 14, 2019 · 3 comments
Open

Can't run "flask" example on Ubuntu 18.04 #516

mkpankov opened this issue Jun 14, 2019 · 3 comments

Comments

@mkpankov
Copy link

mkpankov commented Jun 14, 2019

➜  vagga-flask vagga py3
(1/1) Installing alpine-keys (2.1-r1)
OK: 0 MiB in 1 packages
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
(1/6) Installing musl (1.1.15-r8)
(2/6) Installing busybox (1.25.1-r2)
Executing busybox-1.25.1-r2.post-install
(3/6) Installing libressl2.4-libcrypto (2.4.4-r0)
(4/6) Installing ca-certificates (20161130-r1)
(5/6) Installing libressl2.4-libssl (2.4.4-r0)
(6/6) Installing wget (1.18-r4)
Executing busybox-1.25.1-r2.trigger
Executing ca-certificates-20161130-r1.trigger
OK: 4 MiB in 7 packages
ERROR: could not open HSTS store. HSTS will be disabled.
--2019-06-14 15:19:54--  https://partner-images.canonical.com/core/xenial/current/ubuntu-xenial-core-cloudimg-amd64-root.tar.gz
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 43064991 (41M) [application/x-gzip]
Saving to: '/vagga/cache/downloads/b6e8b34d-ubuntu-xenial-core-cloudimg-amd64-root.tar.gz.part'

/vagga/cache/downloads/b6e8b34d-ubuntu-xenial-core-c 100%[=====================================================================================================================>]  41.07M  1.30MB/s    in 32s     

2019-06-14 15:20:27 (1.28 MB/s) - '/vagga/cache/downloads/b6e8b34d-ubuntu-xenial-core-cloudimg-amd64-root.tar.gz.part' saved [43064991/43064991]

ERROR 2019-06-14T15:20:27Z: vagga::builder: Error building container "flask": step Ubuntu("xenial") failed: Error writing "/vagga/root/run/shm": File exists (os error 17)
ERROR 2019-06-14T15:20:27Z: vagga::wrapper: Error executing _build: Builder exited with code 1
Command <Command "/proc/self/exe" "__wrapper__" "_build" "flask"; environ[7]; uid_map=[UidMap { inside_uid: 0, outside_uid: 1000, count: 1 }, UidMap { inside_uid: 1, outside_uid: 100000, count: 65535 }]; gid_map=[GidMap { inside_gid: 0, outside_gid: 1000, count: 1 }, GidMap { inside_gid: 1, outside_gid: 100000, count: 65535 }]> exited with code 124
➜  vagga-flask RUST_LOG=debug vagga py3
 INFO 2019-06-14T15:20:35Z: vagga::config::config: Found configuration file: Some("/home/mkpankov/projects/vagga-flask/vagga.yaml")
 INFO 2019-06-14T15:20:35Z: vagga::process_util: Running "id" "-u" "-n"
 INFO 2019-06-14T15:20:35Z: vagga::process_util: Running "exe" "__wrapper__" "_build" "flask"
DEBUG 2019-06-14T15:20:35Z: vagga::container::mount: Procfs mount "/home/mkpankov/projects/vagga-flask/.vagga/.mnt/proc"
DEBUG 2019-06-14T15:20:35Z: vagga::container::mount: Pseusofs mount "/home/mkpankov/projects/vagga-flask/.vagga/.mnt/dev/pts" devpts newinstance
 INFO 2019-06-14T15:20:35Z: vagga::process_util: Running "vagga" "__version__" "flask" "--settings" "{\"version_check\":true,\"proxy_env_vars\":true,\"ubuntu_mirror\":null,\"ubuntu_skip_locking\":false,\"alpine_mirror\":null,\"uid_map\":null,\"push_image_script\":null,\"build_lock_wait\":false,\"versioned_build_dir\":false,\"auto_apply_sysctl\":false,\"environ\":{},\"index_all_images\":false,\"hard_link_identical_files\":false,\"hard_link_between_projects\":false,\"run_symlinks_as_commands\":true,\"disable_auto_clean\":false,\"storage_subdir_from_env_var\":null}"
DEBUG 2019-06-14T15:20:35Z: vagga::version::version: Versioning items: 3
DEBUG 2019-06-14T15:20:35Z: vagga::version::version: Versioning setup: Step(Ubuntu("xenial"))
DEBUG 2019-06-14T15:20:35Z: vagga::version::version: Versioning setup: Step(UbuntuUniverse)
DEBUG 2019-06-14T15:20:35Z: vagga::version::version: Versioning setup: Step(Install(["python3-flask"]))
DEBUG 2019-06-14T15:20:35Z: vagga::version: Got hash "68b49a732eee5b9d3dce91ed2bc05b08fb768a710240b9e60b01d344e5017bb1434cdb2295cb608ccd3188f6518b904c8ac866b56c296f72de9efa3812a3f2cb"
DEBUG 2019-06-14T15:20:35Z: vagga::wrapper::build: Container path: "/vagga/base/.roots/flask.68b49a73" (force: false) false
DEBUG 2019-06-14T15:20:35Z: vagga::wrapper::build: Container version: Some("68b49a732eee5b9d3dce91ed2bc05b08fb768a710240b9e60b01d344e5017bb1434cdb2295cb608ccd3188f6518b904c8ac866b56c296f72de9efa3812a3f2cb")
DEBUG 2019-06-14T15:20:35Z: vagga::wrapper::build: Container path: "/vagga/base/.roots/flask.68b49a73" (force: false) false
DEBUG 2019-06-14T15:20:35Z: vagga::container::mount: Pseusofs mount "/vagga/root/dev/pts" devpts newinstance
DEBUG 2019-06-14T15:20:35Z: vagga::container::mount: Procfs mount "/vagga/root/proc"
DEBUG 2019-06-14T15:20:35Z: vagga::container::mount: Procfs mount "/proc"
DEBUG 2019-06-14T15:20:35Z: vagga::builder::guard: Building step: Step(Ubuntu("xenial"))
 INFO 2019-06-14T15:20:35Z: vagga::builder::commands::tarcmd: Unpacking "/vagga/cache/downloads/b6e8b34d-ubuntu-xenial-core-cloudimg-amd64-root.tar.gz" -> "/vagga/root"
ERROR 2019-06-14T15:20:36Z: vagga::builder: Error building container "flask": step Ubuntu("xenial") failed: Error writing "/vagga/root/run/shm": File exists (os error 17)
ERROR 2019-06-14T15:20:36Z: vagga::wrapper: Error executing _build: Builder exited with code 1
Command <Command "/proc/self/exe" "__wrapper__" "_build" "flask"; environ[7]; uid_map=[UidMap { inside_uid: 0, outside_uid: 1000, count: 1 }, UidMap { inside_uid: 1, outside_uid: 100000, count: 65535 }]; gid_map=[GidMap { inside_gid: 0, outside_gid: 1000, count: 1 }, GidMap { inside_gid: 1, outside_gid: 100000, count: 65535 }]> exited with code 124
➜  vagga-flask cat vagga.yaml 
containers:
  flask:
    setup:
    - !Ubuntu xenial
    - !UbuntuUniverse
    - !Install [python3-flask]
commands:
  py3: !Command
    container: flask
    run: python3
@tailhook
Copy link
Owner

This should be fixed in master/testing version. Still not released though :( Which version do you use?

@mkpankov
Copy link
Author

I initially used stable version from Ubuntu repo, then switched to testing and it went away.

When does testing become stable?

@himiranov
Copy link

Same problem with setupping mysql:

containers:
  mysql:
    setup:
    - !Ubuntu xenial
    - !UbuntuUniverse
    - !Sh |
        set -ex
        addgroup --system --gid 200 mysql
        adduser --uid 200 --system --home /data --no-create-home \
            --shell /bin/bash --group --gecos "MySQL user" \
            mysql
    - !Install
      - mysql-server-5.7
      - mysql-client-5.7
    - !Remove /var/lib/mysql
    - !EnsureDir /data
    environ: &db_config
      DB_DATABASE: dbname
      DB_USERNAME: dbusername
      DB_PASSWORD: dbuserpassword
      DB_HOST: 127.0.0.1
      DB_PORT: 3307
      DB_DATA_DIR: /data
    volumes:
      /data: !Persistent
        name: mysql
        owner-uid: 200
        owner-gid: 200
        init-command: _mysql-init
      /run: !Tmpfs
        subdirs:
          mysqld: { mode: 0o777 }
commands:
  mysql: !Command
    container: mysql
    run: |
      mysql -u$DB_USERNAME\
       --default-character-set=utf8\
       -p$DB_PASSWORD\
       -h$DB_HOST\
       -P$DB_PORT\
       $DB_DATABASE

Getting error:

ERROR 2019-06-27T08:34:25Z: vagga::builder: Error building container "mysql": step Ubuntu("xenial") failed: Error writing "/vagga/root/run/shm": File exists (os error 17)
ERROR 2019-06-27T08:34:25Z: vagga::wrapper: Error executing _build: Builder exited with code 1
Command <Command "/proc/self/exe" "__wrapper__" "_build" "mysql"; environ[3]; uid_map=[UidMap { inside_uid: 0, outside_uid: 1000, count: 1 }, UidMap { inside_uid: 1, outside_uid: 100000, count: 65535 }]; gid_map=[GidMap { inside_gid: 0, outside_gid: 1000, count: 1 }, GidMap { inside_gid: 1, outside_gid: 100000, count: 65535 }]> exited with code 124

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants