Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 573153 Details for
Bug 807405
Error when exporting VM - low disk space
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
ovirt-engine-sdk code where this error happens
vm.py (text/plain), 5.01 KB, created by
Martina Kollarova
on 2012-03-27 19:04:55 UTC
(
hide
)
Description:
ovirt-engine-sdk code where this error happens
Filename:
MIME Type:
Creator:
Martina Kollarova
Created:
2012-03-27 19:04:55 UTC
Size:
5.01 KB
patch
obsolete
>#!/usr/bin/env python ># -*- coding: utf-8 -*- ># ># Copyright (c) 2012 Red Hat, Inc. ># ># Licensed under the Apache License, Version 2.0 (the "License"); ># you may not use this file except in compliance with the License. ># You may obtain a copy of the License at ># ># http://www.apache.org/licenses/LICENSE-2.0 ># ># Unless required by applicable law or agreed to in writing, software ># distributed under the License is distributed on an "AS IS" BASIS, ># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ># See the License for the specific language governing permissions and ># limitations under the License. ># > >''' Test operations on a VM (start, suspend, stop, create snapshot etc). > > >''' > >from common import * >from nose.tools import * > >MB = 1024*1024 >GB = 1024*MB > ># Names of created objects. Should be removed at the end of this test module ># and not used by any other test module. >ISO_NAME = 'my_iso' >EXPORT_NAME = 'my_export' >VM_NAME = 'my_vm' >SNAPSHOT_NAME = 'my_snapshot' >TEMPLATE_NAME = 'my_template' > > >logger = logging.getLogger(__name__) > > > > >def setUpModule(): > ''' Creates VM at the beginning of testing this module (not in each test). > > ''' > > logger.info('Creating VM "' + VM_NAME + '"') > assert api.vms.get(VM_NAME) == None, \ > "VM with the name '" + VM_NAME + "' already exists" > api.vms.add(params.VM( > name=VM_NAME, memory=2*GB, cluster=api.clusters.get(CLUSTER_NAME), > template=api.templates.get('Blank'))) > > logger.info('Attaching NIC to VM') > api.vms.get(VM_NAME).nics.add(params.NIC(name='eth0', > network=params.Network(name='ovirtmgmt'), interface='virtio')) > > logger.info('Attaching disk space to VM') > param = params.StorageDomains( > storage_domain=[api.storagedomains.get(STORAGE_NAME)]) > > api.vms.get(VM_NAME).disks.add(params.Disk( > storage_domains=param, size=512*MB, type_='system', status=None, > interface='virtio', format='cow', sparse=True, bootable=True)) > > waitForVMState(VM_NAME, 'down') > assert api.vms.get(VM_NAME).status.state == 'down' > > >def tearDownModule(): > ''' Removes VM at the end of testing this module (only once) ''' > > if api.vms.get(VM_NAME).status.state != 'down': > logging.warning('VM is not down at the end of the testcase, \ > stopping it now') > api.vms.get(VM_NAME).stop() > waitForVMState(VM_NAME, 'down'); > > logger.info('Removing VM "' + VM_NAME + '"') > api.vms.get(VM_NAME).delete() > > logger.info('Waiting for VM removal') > t = 0 > while VM_NAME in [vm.name for vm in api.vms.list()] and t <= TIMEOUT: > t += 1 > sleep(1) > assert api.vms.get(VM_NAME) == None > > > > >def setUpExport(): > ''' Creates export domain for further use. ''' > storageParam = params.Storage(type_='nfs', > address=EXPORT_ADDRESS, path=EXPORT_PATH) > domainParam = params.StorageDomain(name=EXPORT_NAME, > data_center=api.datacenters.get(DC_NAME), > type_='export', host=api.hosts.get(HOST_NAME), > storage = storageParam) > logger.info("Creating export domain") > api.storagedomains.add(domainParam) > > dc = api.datacenters.get(DC_NAME) > dc.storagedomains.add(api.storagedomains.get(EXPORT_NAME)) > > waitForStorageActivation(EXPORT_NAME) > assert dc.storagedomains.get(EXPORT_NAME).status.state == "active" > > >def tearDownExport(): > ''' Removes export domain. ''' > logger.info("Removing export domain") > dc = api.datacenters.get(name=DC_NAME) > dc.storagedomains.get(EXPORT_NAME).deactivate() > assert dc.storagedomains.get(EXPORT_NAME).status.state == 'maintenance' > > dc.storagedomains.get(EXPORT_NAME).delete() > assert api.storagedomains.get(EXPORT_NAME).status.state == 'unattached' > > param = params.StorageDomain(name=EXPORT_NAME, > host=params.Host(name=HOST_NAME), format=True) > api.storagedomains.get(EXPORT_NAME).delete(param) > assert api.storagedomains.get(EXPORT_NAME) == None > > >@with_setup(setUpExport, tearDownExport) >def test_exportDeleteImportVM(): > ''' Export VM, remove it and then re-create by importing. > > Will not change VM if successfull and the VM will be put into the 'down' state. > > Expected: > VM state at beginning: down > VM state at end: down > > ''' > logger.info("Exporting VM") > api.vms.get(VM_NAME).export(params.Action( > storage_domain=api.storagedomains.get(EXPORT_NAME))) > waitForVMState(VM_NAME, 'down') > assert api.vms.get(VM_NAME).status.state == 'down' > > logger.info("Deleting VM") > api.vms.get(VM_NAME).delete() > while api.vms.get(VM_NAME) != None: > sleep(1) > > logger.info("Importing VM") > param = params.Action(storage_domain=api.storagedomains.get(STORAGE_NAME), > cluster=api.clusters.get(name=CLUSTER_NAME)) > api.storagedomains.get(EXPORT_NAME).vms.get(VM_NAME).import_vm(param) > assert api.vms.get(VM_NAME) != None > waitForVMState(VM_NAME, 'down') > assert api.vms.get(VM_NAME).status.state == 'down' > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 807405
:
573132
|
573140
| 573153