abhilekhsingh / gc3pie

Automatically exported from code.google.com/p/gc3pie
0 stars 0 forks source link

OpenStack backend selecting wrong instance flavor #446

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Make an OpenStack VM snapshot that consumes more disk space larger than most 
flavors allow: e.g., 10GB.  This snapshot should include application code.
2. Configure GC3Pie to run applications on OpenStack, using the above snapshot.
3. However, make your application have modest requirements in term of CPU and 
memory.
4. Optionally, for added confusion, configure `instance_type` in your OpenStack 
resource configuration section.
5. Start a `SessionBasedScript`.

What is the expected output? What do you see instead?

I would expect that:

(a) `Application` instances to start with the configured `instance_type`;
(b) if that is not specified, that a compatible flavor is chosen;
(c) if neither is possible, that an explicit sane error message is output.

Instead, GC3Pie can select a flavor that does not have enough disk
space to host the snapshot, and then gets stuck in a loop where it is
trying to create instances that go immediately into ERROR state.  No
error message is ever seen; inspecting the OpenStack logs reveals the
root cause of the problem::

    node-07-01-02: ... INFO nova.compute.manager ... Image 'fd184407-b1b5-4aa7-9c6f-3155de43c0bd' size 6452740096 exceeded instance_type allowed size 5368709120

Original issue reported on code.google.com by riccardo.murri@gmail.com on 30 Jun 2014 at 2:58

GoogleCodeExporter commented 9 years ago
In addition, the `instance_type` configuration option is *ignored*
if present, and the GC3Pie OpenStack backend just chooses a flavor
based on CPU and RAM req's.

Original comment by riccardo.murri@gmail.com on 30 Jun 2014 at 3:26

GoogleCodeExporter commented 9 years ago
I'm attaching a tentative patch for the issue, which I have not yet
committed to trunk.

The patch modifies the documented behavior of GC3Pie as follows:

(1) if there is an application-specific `_instance_type` config key, use that.
(2) if there is a generic `instance_type` config key, use it.
(3) by default, guess a compatible flavor (but still ignores disk space req's)

This is not a full fix, but still allows to work around the problem.

Original comment by riccardo.murri@gmail.com on 30 Jun 2014 at 3:27

Attachments: