no default image set on deployment

Bug #2029101 reported by Samuel Walladge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Anbox Cloud
Fix Committed
High
Jatin Arora

Bug Description

On a fresh deployment, there is no default image set, causing launching apps to fail:

```
ubuntu@ip-10-10-1-10:~/anbox$ juju exec --unit ams/0 -- amc image list
+----------------------+------------------------+--------+----------+--------------+---------+
| ID | NAME | STATUS | VERSIONS | ARCHITECTURE | DEFAULT |
+----------------------+------------------------+--------+----------+--------------+---------+
| cih1ih53v7q1ajqsnfqg | jammy:android13:arm64 | active | 1 | aarch64 | false |
+----------------------+------------------------+--------+----------+--------------+---------+
...
| cih1k7n9ic9jojg4iojg | bionic:android10:arm64 | active | 1 | aarch64 | false |
+----------------------+------------------------+--------+----------+--------------+---------+
```

To work around, we need to run `amc image switch` with the image we want (for example, the below snippet to set the android13 image as default):

```
ubuntu@ip-10-10-1-10:~/anbox$ juju exec --unit ams/0 -- amc image switch \
  $(juju exec --unit ams/0 -- amc image list --format json | jq -r '.[] | select(.name|contains("android13")).id')
ubuntu@ip-10-10-1-10:~/anbox$ juju exec --unit ams/0 -- amc image list
+----------------------+------------------------+--------+----------+--------------+---------+
| ID | NAME | STATUS | VERSIONS | ARCHITECTURE | DEFAULT |
+----------------------+------------------------+--------+----------+--------------+---------+
| cih1ih53v7q1ajqsnfqg | jammy:android13:arm64 | active | 1 | aarch64 | true |
+----------------------+------------------------+--------+----------+--------------+---------+
...
| cih1k7n9ic9jojg4iojg | bionic:android10:arm64 | active | 1 | aarch64 | false |
+----------------------+------------------------+--------+----------+--------------+---------+
```

Ideally we would want to control which is set as default too - eg. `juju config ams default-image="*:android13:*"`.

Jatin Arora (jatinarora)
Changed in anbox-cloud:
assignee: nobody → Jatin Arora (jatinarora)
Revision history for this message
Jatin Arora (jatinarora) wrote :

If possible could I get a little more information on the following questions:

Q. Are there some logs available which were captured from the time when this happened ?
Q. How often does this occur (if you already know it)?
Q. Are there any steps that you do in general which you can think about that consistently trigger this behaviour frequently ?

Changed in anbox-cloud:
status: New → Incomplete
Revision history for this message
Samuel Walladge (swalladge) wrote (last edit ):

Hi Jatin,

I don't have any logs still around sorry. This occurs with every fresh deployment - observed in 1.18/stable. So hopefully it will be easy to reproduce (please let us know if you have an environment/bundle where it sets a default image out of the box). I don't think we've been doing any particular steps which could trigger it - we deploy the bundle and always find that no default image is set. Unless there is specific config in amc that we need to set to ensure a default is set?

Revision history for this message
Simon Fels (morphis) wrote :

> Ideally we would want to control which is set as default too - eg. `juju config ams default-image="*:android13:*"`.

We should not overload the Juju configuration with these things. Generally the default image shouldn't be that much of an issue to choose as it's more a sane default and for apps you will select something specific anyway to ensure you run against something which is compatible and has been tested.

That the image isn't set is a race condition in AMS which needs to be fixed.

Revision history for this message
Simon Fels (morphis) wrote :

We did some rework internally which will solve this problem which is specifically tight to a HA installation of AMS.

Changed in anbox-cloud:
milestone: none → 1.20.0
importance: Undecided → High
status: Incomplete → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.