nova pause return 'n/a (HTTP 404)'

Asked by lam kwan pak

I have encountered problems in using some of the osapi commands. When I tried to use commands such as pause,suspend,action,rescue, the return result is 'n/a (http 404)'. I found that the nova-api.log file contains info of "No route matched for POST...."

Hence, I would like to ask if I have missed something in installing and configuring OpenStack compute.

Any help would be appreciated=]

P.S. Single node configuration
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
For example:
# nova list
+----+----------+---------+-----------+-------------+
| ID | Name | Status | Public IP | Private IP |
+----+----------+---------+-----------+-------------+
| 2 | Server 2 | SHUTOFF | | 192.168.4.3 |
| 3 | test | ACTIVE | | 192.168.4.2 |
| 4 | testname | SHUTOFF | | 192.168.4.4 |
+----+----------+---------+-----------+-------------+
# nova pause 3
n/a (HTTP 404)
# nova list
+----+----------+---------+-----------+-------------+
| ID | Name | Status | Public IP | Private IP |
+----+----------+---------+-----------+-------------+
| 2 | Server 2 | SHUTOFF | | 192.168.4.3 |
| 3 | test | ACTIVE | | 192.168.4.2 |
| 4 | testname | SHUTOFF | | 192.168.4.4 |
+----+----------+---------+-----------+-------------+

In nova-api.log:
2011-07-21 11:15:44,711 DEBUG nova.api.openstack [-] Successfully authenticated 'root' from (pid=1416) authenticate /usr/lib/pymodules/python2.7/nova/api/openstack/auth.py:111
2011-07-21 11:15:44,828 DEBUG routes.middleware [-] Matched GET /servers/detail from (pid=1416) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:100
2011-07-21 11:15:44,829 DEBUG routes.middleware [-] Route path: '/servers/detail', defaults: {'action': u'detail', 'controller': <nova.api.openstack.wsgi.Resource object at 0x2e98990>} from (pid=1416) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:102
2011-07-21 11:15:44,829 DEBUG routes.middleware [-] Match dict: {'action': u'detail', 'controller': <nova.api.openstack.wsgi.Resource object at 0x2e98990>} from (pid=1416) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:103
2011-07-21 11:15:44,829 INFO nova.api.openstack.wsgi [-] GET http://10.0.2.15:8774/v1.0/servers/detail?fresh=1311218144.72
2011-07-21 11:15:44,996 INFO nova.api.openstack.wsgi [-] http://10.0.2.15:8774/v1.0/servers/detail?fresh=1311218144.72 returned with HTTP 200
2011-07-21 11:15:50,758 DEBUG nova.api.openstack [-] Successfully authenticated 'root' from (pid=1416) authenticate /usr/lib/pymodules/python2.7/nova/api/openstack/auth.py:111
2011-07-21 11:15:50,860 DEBUG routes.middleware [-] Matched GET /servers/3 from (pid=1416) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:100
2011-07-21 11:15:50,860 DEBUG routes.middleware [-] Route path: '/servers/:(id)', defaults: {'action': u'show', 'controller': <nova.api.openstack.wsgi.Resource object at 0x2e98990>} from (pid=1416) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:102
2011-07-21 11:15:50,861 DEBUG routes.middleware [-] Match dict: {'action': u'show', 'controller': <nova.api.openstack.wsgi.Resource object at 0x2e98990>, 'id': u'3'} from (pid=1416) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:103
2011-07-21 11:15:50,861 INFO nova.api.openstack.wsgi [-] GET http://10.0.2.15:8774/v1.0/servers/3?fresh=1311218150.78
2011-07-21 11:15:51,319 INFO nova.api.openstack.wsgi [-] http://10.0.2.15:8774/v1.0/servers/3?fresh=1311218150.78 returned with HTTP 200
2011-07-21 11:15:51,363 DEBUG routes.middleware [-] No route matched for POST /servers/3/pause from (pid=1416) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:97
2011-07-21 11:15:55,162 DEBUG nova.api.openstack [-] Successfully authenticated 'root' from (pid=1416) authenticate /usr/lib/pymodules/python2.7/nova/api/openstack/auth.py:111
2011-07-21 11:15:55,188 DEBUG routes.middleware [-] Matched GET /servers/detail from (pid=1416) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:100
2011-07-21 11:15:55,189 DEBUG routes.middleware [-] Route path: '/servers/detail', defaults: {'action': u'detail', 'controller': <nova.api.openstack.wsgi.Resource object at 0x2e98990>} from (pid=1416) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:102
2011-07-21 11:15:55,189 DEBUG routes.middleware [-] Match dict: {'action': u'detail', 'controller': <nova.api.openstack.wsgi.Resource object at 0x2e98990>} from (pid=1416) __call__ /usr/lib/pymodules/python2.7/routes/middleware.py:103
2011-07-21 11:15:55,189 INFO nova.api.openstack.wsgi [-] GET http://10.0.2.15:8774/v1.0/servers/detail?fresh=1311218155.17
2011-07-21 11:15:55,384 INFO nova.api.openstack.wsgi [-] http://10.0.2.15:8774/v1.0/servers/detail?fresh=1311218155.17 returned with HTTP 200

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# nova-manage service list
lampard-VirtualBox nova-network enabled :-) 2011-07-21 03:38:08
lampard-VirtualBox nova-scheduler enabled :-) 2011-07-21 03:38:05
lampard-VirtualBox nova-compute enabled :-) 2011-07-21 03:38:08

P.S. Manually started the glance-api service by # glance-control glance-api start

# nova-manage version list
2011.3-dev (2011.3-workspace:tarmac-20110629191700-x5jgo833j3md5rsm)

In /etc/nova/nova.conf
--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/usr/bin/nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--lock_path=/var/lock/nova
--verbose
--s3_host=10.0.2.15
--rabbit_host=10.0.2.15
--cc_host=10.0.2.15
--ec2_url=http://10.0.2.15:8773/services/Cloud
--fixed_range=192.168.4.0/12
--network_size=256
--FAKE_subdomain=osapi
--routing_source_ip=10.0.2.15
--verbose
--sql_connection=mysql://root:0000@10.0.2.15/nova
--network_manager=nova.network.manager.FlatDHCPManager
--flat_network_dhcp_start=192.168.4.2
--public_interface=eth0
--flat_injected=False
--libvirt_type=qemu

# ifconfig
br100 Link encap:Ethernet HWaddr fe:16:3e:5c:ac:84
         inet addr:192.168.4.1 Bcast:192.168.4.255 Mask:255.255.255.0
         inet6 addr: fe80::84a9:ecff:fef8:e164/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
         RX packets:9102 errors:0 dropped:0 overruns:0 frame:0
         TX packets:9329 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:2990063 (2.9 MB) TX bytes:3104721 (3.1 MB)

eth0 Link encap:Ethernet HWaddr 08:00:27:48:bb:37
         inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
         inet6 addr: fe80::a00:27ff:fe48:bb37/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
         RX packets:22169 errors:0 dropped:0 overruns:0 frame:0
         TX packets:14749 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:23272581 (23.2 MB) TX bytes:1767743 (1.7 MB)

lo Link encap:Local Loopback
         inet addr:127.0.0.1 Mask:255.0.0.0
         inet6 addr: ::1/128 Scope:Host
         UP LOOPBACK RUNNING MTU:16436 Metric:1
         RX packets:60942 errors:0 dropped:0 overruns:0 frame:0
         TX packets:60942 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:41878929 (41.8 MB) TX bytes:41878929 (41.8 MB)

virbr0 Link encap:Ethernet HWaddr 0a:24:b3:2a:ab:8e
         inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:99 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:0 (0.0 B) TX bytes:7634 (7.6 KB)

vnet0 Link encap:Ethernet HWaddr fe:16:3e:5c:ac:84
         inet6 addr: fe80::fc16:3eff:fe5c:ac84/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
         RX packets:9225 errors:0 dropped:0 overruns:0 frame:0
         TX packets:9137 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:500
         RX bytes:3126353 (3.1 MB) TX bytes:3086533 (3.0 MB)

# nova-manage config list
--storage_availability_zone=nova
--ca_file=cacert.pem
--ec2_dmz_host=$my_ip
--fixed_range=192.168.4.0/12
--compute_topic=compute
--dmz_mask=255.255.255.0
--fixed_range_v6=fd00::/48
--glance_api_servers=10.0.2.15:9292
--rabbit_password=guest
--user_cert_subject=/C=US/ST=California/L=MountainView/O=AnsoLabs/OU=NovaDev/CN=%s-%s-%s
--s3_dmz=$my_ip
--quota_ram=51200
--find_host_timeout=30
--aws_access_key_id=admin
--vncserver_host=0.0.0.0
--network_size=256
--enable_new_services
--my_ip=10.0.2.15
--live_migration_bandwidth=0
--lockout_attempts=5
--password_length=12
--quota_max_injected_files=5
--zone_capabilities=hypervisor=xenserver;kvm,os=linux;windows
--logdir=/var/log/nova
--sqlite_db=nova.sqlite
--nouse_forwarded_for
--cpuinfo_xml_template=/usr/lib/pymodules/python2.7/nova/virt/cpuinfo.xml.template
--num_networks=1
--boot_script_template=/usr/lib/pymodules/python2.7/nova/cloudpipe/bootscript.template
--live_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER
--notification_driver=nova.notifier.no_op_notifier
--osapi_max_limit=1000
--rabbit_port=5672
--live_migration_retry_count=30
--rabbit_max_retries=12
--quota_metadata_items=128
--ajax_console_proxy_url=http://127.0.0.1:8000
--injected_network_template=/usr/lib/pymodules/python2.7/nova/virt/interfaces.template
--network_host=lampard-VirtualBox
--snapshot_name_template=snapshot-%08x
--vncproxy_url=http://127.0.0.1:6080
--ajax_console_proxy_topic=ajax_proxy
--minimum_root_size=10737418240
--quota_cores=20
--nouse_project_ca
--rabbit_userid=guest
--volume_topic=volume
--volume_name_template=volume-%08x
--lock_path=/var/lock/nova
--live_migration_uri=qemu+tcp://%s/system
--flat_network_dns=8.8.4.4
--connection_type=libvirt
--noupdate_dhcp_on_disassociate
--default_project=openstack
--s3_port=3333
--logging_context_format_string=%(asctime)s %(levelname)s %(name)s [%(request_id)s %(user)s %(project)s] %(message)s
--instance_name_template=instance-%08x
--ec2_host=$my_ip
--credential_key_file=pk.pem
--vpn_cert_subject=/C=US/ST=California/L=MountainView/O=AnsoLabs/OU=NovaDev/CN=project-vpn-%s-%s
--logging_debug_format_suffix=from (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d
--stub_network=False
--console_manager=nova.console.manager.ConsoleProxyManager
--default_log_levels=amqplib=WARN,sqlalchemy=WARN,boto=WARN,eventlet.wsgi.server=WARN
--osapi_scheme=http
--credential_rc_file=%src
--sql_connection=mysql://root:0000@10.0.2.15/nova
--console_topic=console
--norabbit_use_ssl
--instances_path=$state_path/instances
--noflat_injected
--use_local_volumes
--host=lampard-VirtualBox
--flat_network_dhcp_start=192.168.4.2
--fixed_ip_disassociate_timeout=600
--console_host=lampard-VirtualBox
--quota_instances=10
--quota_max_injected_file_content_bytes=10240
--floating_range=4.4.4.0/24
--lockout_window=15
--db_backend=sqlalchemy
--credentials_template=/usr/lib/pymodules/python2.7/nova/auth/novarc.template
--dmz_net=10.0.0.0
--sql_retry_interval=10
--vpn_start=1000
--volume_driver=nova.volume.driver.ISCSIDriver
--crl_file=crl.pem
--rpc_conn_pool_size=30
--s3_host=10.0.2.15
--qemu_img=qemu-img
--max_nbd_devices=16
--vlan_interface=eth0
--scheduler_topic=scheduler
--verbose
--sql_max_retries=12
--default_instance_type=m1.small
--firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver
--libvirt_type=qemu
--image_decryption_dir=/tmp
--vpn_key_suffix=-vpn
--use_cow_images
--block_size=268435456
--null_kernel=nokernel
--libvirt_xml_template=/usr/lib/pymodules/python2.7/nova/virt/libvirt.xml.template
--vpn_client_template=/usr/lib/pymodules/python2.7/nova/cloudpipe/client.ovpn.template
--credential_vpn_file=nova-vpn.conf
--service_down_time=60
--nopublish_errors
--credential_cert_file=cert.pem
--allowed_roles=cloudadmin,itsec,sysadmin,netadmin,developer
--logging_exception_prefix=(%(name)s): TRACE:
--quota_max_injected_file_path_bytes=255
--scheduler_manager=nova.scheduler.manager.SchedulerManager
--ec2_port=8773
--rescue_kernel_id=aki-rescue
--osapi_port=8774
--auth_token_ttl=3600
--quota_volumes=10
--libvirt_uri=
--flat_network_bridge=br100
--ec2_scheme=http
--keys_path=$state_path/keys
--vpn_image_id=0
--host_state_interval=120
--noauto_assign_floating_ip
--quota_floating_ips=10
--nofake_call
--state_path=/var/lib/nova
--sql_idle_timeout=3600
--vpn_ip=$my_ip
--default_image=ami-11111
--aws_secret_access_key=admin
--nouse_ipv6
--key_file=private/cakey.pem
--nofake_network
--osapi_extensions_path=/var/lib/nova/extensions
--quota_gigabytes=1000
--region_list=
--auth_driver=nova.auth.dbdriver.DbDriver
--network_manager=nova.network.manager.FlatDHCPManager
--noenable_zone_routing
--osapi_host=$my_ip
--zone_name=nova
--rescue_image_id=ami-rescue
--logging_default_format_string=%(asctime)s %(levelname)s %(name)s [-] %(message)s
--timeout_nbd=10
--compute_driver=nova.virt.connection.get_connection
--nofake_rabbit
--rabbit_host=10.0.2.15
--vnc_keymap=en-us
--rescue_timeout=0
--nouse_syslog
--superuser_roles=cloudadmin
--osapi_path=/v1.0/
--ec2_path=/services/Cloud
--allow_project_net_traffic
--ca_path=$state_path/CA
--rabbit_retry_interval=10
--node_availability_zone=nova
--lockout_minutes=15
--db_driver=nova.db.api
--ajaxterm_portrange=10000-12000
--volume_manager=nova.volume.manager.VolumeManager
--nostart_guests_on_host_boot
--vlan_start=100
--rpc_thread_pool_size=1024
--ipv6_backend=rfc2462
--vnc_enabled
--global_roles=cloudadmin,itsec
--rabbit_virtual_host=/
--rescue_ramdisk_id=ari-rescue
--network_driver=nova.network.linux_net
--ajax_console_proxy_port=8000
--project_cert_subject=/C=US/ST=California/L=MountainView/O=AnsoLabs/OU=NovaDev/CN=project-ca-%s-%s
--image_service=nova.image.glance.GlanceImageService
--control_exchange=nova
--cnt_vpn_clients=0
--vncproxy_topic=vncproxy
--compute_manager=nova.compute.manager.ComputeManager
--network_topic=network

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
lam kwan pak
Solved:
Last query:
Last reply:
Revision history for this message
Brian Waldon (bcwaldon) said :
#1

The 'pause' resource is part of the Admin API. It is an optionally-enabled set of resources on /servers/<id>/ that shouldn't be exposed to non-admin users. Please set the 'allow_admin_api' flag to true, restart, and make your request again.

Revision history for this message
lam kwan pak (slkp-2005) said :
#2

Sorry for the late reply
It works fine=]
Thanks!