#42 setting disk size in testcloud settings.py does not appear to be working
Closed: Invalid None Opened 7 years ago by tflink.

It appears that testcloud is not obeying the DISK_SIZE setting and the instances have the same size disk that their parent image does.

We've worked around this for now in libtaskotron by making the images bigger (20G) but that's not the ideal solution.

Determine whether the disk resize functionality works. Fix it if it is not working, coordinate with the image building so that the size there can be decreased.


It seems that this is a common bug(partition and filesystem will be resized on the second boot),and turns out that Adam have submitted a patch,which works pretty well, to fix this:https://bodhi.fedoraproject.org/updates/FEDORA-2016-714119426f,
and we don't see this bug anymore in Fedora-Cloud-Base-24-1.2.x86_64.qcow2.I think maybe we should add a disksize option to libtaskotron ,and I'd like do the favor if this is agreed.

@somebody, have you run any tests with testcloud to see if the issue is fixed for newer cloud images?

I'm interested in adding some form of size argument to libtaskotron but I'm not sure how exactly we want to go about doing that. My first thought had been something along how EC2 sizes work - generic "small", "medium", "large" which correspond to a certain amount of disk, CPU, Memory etc.

The big issue which comes to mind for me is how we go about defining the sizes and whether it would end up creating more confusion that it would solve.

Other thoughts?

! In #804#11519, @tflink wrote:
@somebody, have you run any tests with testcloud to see if the issue is fixed for newer cloud images?

yeah,sure,I have run lots of tests with testcloud using Fedora-Cloud-Base-24-1.2.x86_64.qcow2.Haven't got a chance to test the rawhide,
as there is no testcloud usable image yet.But I believe we won't see this bug again as long as the images use Adam's patch:)

I'm interested in adding some form of size argument to libtaskotron but I'm not sure how exactly we want to go about doing that. My first thought had been something along how EC2 sizes work - generic "small", "medium", "large" which correspond to a certain amount of disk, CPU, Memory etc.
The big issue which comes to mind for me is how we go about defining the sizes and whether it would end up creating more confusion that it would solve.
Other thoughts?

I don't know which one is better:adding three models('small','medium','large'),or adding three arguments(--disksize,--cpu,--mem).
If I'm understanding correctly,the Amazon instance models are the result of lots of work,and different instance models are created for different use situations.One difference between our testcloud created instance and the Amazon instance is that there will be only one person to visit it,which is our libtaskotron user.Maybe in our situation,that user is exactly the one who knows how much libtaskotron wants.Maybe we won't be able to cover all the cases with only three models?Maybe I 'm too green to offer right ideas,but think it's better to say my thought out:)

! In #804#11527, @somebody wrote:

! In #804#11519, @tflink wrote:
@somebody, have you run any tests with testcloud to see if the issue is fixed for newer cloud images?

yeah,sure,I have run lots of tests with testcloud using Fedora-Cloud-Base-24-1.2.x86_64.qcow2.Haven't got a chance to test the rawhide,
as there is no testcloud usable image yet.But I believe we won't see this bug again as long as the images use Adam's patch:)

OK, I'll close it. If the problem ever comes up again, we can re-open.

I'm interested in adding some form of size argument to libtaskotron but I'm not sure how exactly we want to go about doing that. My first thought had been something along how EC2 sizes work - generic "small", "medium", "large" which correspond to a certain amount of disk, CPU, Memory etc.
The big issue which comes to mind for me is how we go about defining the sizes and whether it would end up creating more confusion that it would solve.
Other thoughts?

I don't know which one is better:adding three models('small','medium','large'),or adding three arguments(--disksize,--cpu,--mem).
If I'm understanding correctly,the Amazon instance models are the result of lots of work,and different instance models are created for different use situations.One difference between our testcloud created instance and the Amazon instance is that there will be only one person to visit it,which is our libtaskotron user.Maybe in our situation,that user is exactly the one who knows how much libtaskotron wants.Maybe we won't be able to cover all the cases with only three models?Maybe I 'm too green to offer right ideas,but think it's better to say my thought out:)

Don't worry about "being green". I have the opposite problem - I've been around this stuff for so long that the solution (or the need for a solution) can escape me :)

I wonder how much work it would be to do both solutions - to have an override-able definition of small, medium, large for the impatient and allow setting the memory, disk etc. directly.

Don't worry about "being green". I have the opposite problem - I've been around this stuff for so long that the solution (or the need for a solution) can escape >me :)

I guess I can get the feeling you are talking about, maybe that's part of the reason why you want to try different new things.Maybe trying different new things and adopting them to fedora is the way that you are doing fantastic great contributions to Fedora :)

I wonder how much work it would be to do both solutions - to have an override-able definition of small, medium, large for the impatient and allow setting the >memory, disk etc. directly.

Not much,most is repetitive work.Here is the draft:
add a --vcpu argument for testcloud first,then add --vcpu,--ram,--disksize,and --ins-flavor arguments for libtaskotron.And modify the code in main.py:

def process_args(raw_args):
    ...
    args = copy.deepcopy(raw_args)
    # store the original unprocessed args for later use when passing it to the minion
    args['_orig_args'] = raw_args
    if args['ins-flavor']=='small':
         if not args['disksize']:
            args['disksize']= 3
         if not args['ram']:
            args['ram']= 256
         if not args['vcpu']:
            args['vcpu']= 1
    elif args['ins-flavor']=='medium':
         if not args['disksize']:
            args['disksize']= 10
         if not args['ram']:
            args['ram']= 1024
         if not args['vcpu']:
            args['vcpu']= 2
    elif args['ins-flavor']=='large':
         if not args['disksize']:
            args['disksize']= 20
         if not args['ram']:
            args['ram']= 2048
         if not args['vcpu']:
            args['vcpu']= 4
    # process item + type
    ...

The numbers need to be modified ,before we add these arguments.

Login to comment on this ticket.

Metadata