nova-scheduler调度系统科研进展

***********************************************************************************
命令:
lsof -i | grep ly-controller:amqp


连接情况:
nova-api 2个连接(1),52272 52405
nova-cert 1个连接(1),52248
nova-conductor 3个连接(2),52250 52268 52569
nova-consoleauth 3个连接(1),52247 52406 52413
nova-scheduler 1个连接(1),52249


抓包命令:
tcp.port == 58737
amqp && tcp.port == 58737


***********************************************************************************
rabbitmqctl


rabbitmqctl start_app
rabbitmqctl stop_app
rabbitmqctl list_exchanges
rabbitmqctl list_queues
rabbitmqctl list_consumers
rabbitmqctl list_vhosts
rabbitmqctl cluster_status
rabbitmqctl status 查看RabbitMQ版本,3.2.4


Usage:
rabbitmqctl [-n <node>] [-q] <command> [<command options>] 


Options:
    -n node
    -q


Default node is "rabbit@server", where server is the local host. On a host 
named "server.example.com", the node name of the RabbitMQ Erlang node will 
usually be rabbit@server (unless RABBITMQ_NODENAME has been set to some 
non-default value at broker startup time). The output of hostname -s is usually 
the correct suffix to use after the "@" sign. See rabbitmq-server(1) for 
details of configuring the RabbitMQ broker.


Quiet output mode is selected with the "-q" flag. Informational messages are 
suppressed when quiet mode is in effect.


Commands:
    stop [<pid_file>]
    stop_app
    start_app
    wait <pid_file>
    reset
    force_reset
    rotate_logs <suffix>


    join_cluster <clusternode> [--ram]
    cluster_status
    change_cluster_node_type disc | ram
    forget_cluster_node [--offline]
    update_cluster_nodes clusternode
    sync_queue queue
    cancel_sync_queue queue


    add_user <username> <password>
    delete_user <username>
    change_password <username> <newpassword>
    clear_password <username>
    set_user_tags <username> <tag> ...
    list_users


    add_vhost <vhostpath>
    delete_vhost <vhostpath>
    list_vhosts [<vhostinfoitem> ...]
    set_permissions [-p <vhostpath>] <user> <conf> <write> <read>
    clear_permissions [-p <vhostpath>] <username>
    list_permissions [-p <vhostpath>]
    list_user_permissions <username>


    set_parameter [-p <vhostpath>] <component_name> <name> <value>
    clear_parameter [-p <vhostpath>] <component_name> <key>
    list_parameters [-p <vhostpath>]


    set_policy [-p <vhostpath>] [--priority <priority>] [--apply-to <apply-to>] 
<name> <pattern>  <definition>
    clear_policy [-p <vhostpath>] <name>
    list_policies [-p <vhostpath>]


    list_queues [-p <vhostpath>] [<queueinfoitem> ...]
    list_exchanges [-p <vhostpath>] [<exchangeinfoitem> ...]
    list_bindings [-p <vhostpath>] [<bindinginfoitem> ...]
    list_connections [<connectioninfoitem> ...]
    list_channels [<channelinfoitem> ...]
    list_consumers [-p <vhostpath>]
    status
    environment
    report
    eval <expr>


    close_connection <connectionpid> <explanation>
    trace_on [-p <vhost>]
    trace_off [-p <vhost>]
    set_vm_memory_high_watermark <fraction>


<vhostinfoitem> must be a member of the list [name, tracing].


The list_queues, list_exchanges and list_bindings commands accept an optional 
virtual host parameter for which to display results. The default value is "/".


<queueinfoitem> must be a member of the list [name, durable, auto_delete, 
arguments, policy, pid, owner_pid, exclusive_consumer_pid, 
exclusive_consumer_tag, messages_ready, messages_unacknowledged, messages, 
consumers, memory, slave_pids, synchronised_slave_pids, status].


<exchangeinfoitem> must be a member of the list [name, type, durable, 
auto_delete, internal, arguments, policy].


<bindinginfoitem> must be a member of the list [source_name, source_kind, 
destination_name, destination_kind, routing_key, arguments].


<connectioninfoitem> must be a member of the list [pid, name, port, host, 
peer_port, peer_host, ssl, ssl_protocol, ssl_key_exchange, ssl_cipher, 
ssl_hash, peer_cert_subject, peer_cert_issuer, peer_cert_validity, 
last_blocked_by, last_blocked_age, state, channels, protocol, auth_mechanism, 
user, vhost, timeout, frame_max, client_properties, recv_oct, recv_cnt, 
send_oct, send_cnt, send_pend].


<channelinfoitem> must be a member of the list [pid, connection, name, number, 
user, vhost, transactional, confirm, consumer_count, messages_unacknowledged, 
messages_uncommitted, acks_uncommitted, messages_unconfirmed, prefetch_count, 
client_flow_blocked].




队列信息:
还在ubuntu上


***********************************************************************************
插件方面的命令:
rabbitmq-plugins list
rabbitmq-plugins enable 插件名称
rabbitmq-plugins disable 插件名称


启动WebUI
rabbitmq-plugins enable rabbitmq_management
service rabbitmq-server restart


http://ly-controller:15672/
用户名密码为:guest 123


当前AMQP协议版本:
AMQP 0-9-1
身份认证方式:
AMQPLAIN


{"oslo.message": "{\"_unique_id\": \"db293b166e7f4d6698a274c34aa14fca\", \"failure\": null, \"result\": {\"binary\": \"nova-compute\", \"deleted\": 0, \"created_at\": \"2014-11-28T08:57:47.000000\", \"updated_at\": \"2015-02-03T09:29:00.295827\", \"report_count\": 112072, \"topic\": \"compute\", \"host\": \"ly-compute1\", \"disabled\": false, \"deleted_at\": null, \"disabled_reason\": \"None\", \"id\": 5}, \"_msg_id\": \"052571886b264a24bf261899226bacbf\"}", "oslo.version": "2.0"}


队列监控:
创建test13,首先会调用nova-scheduler进行调度,因此需要监控scheduler.ly-controller队列,然后test13会部署在ly-compute2上,因此需要监控compute.ly-compute2队列
队列 连接 监控方法 监控网卡
scheduler.ly-controller ly-controller:60917 需要在ly-controller主机上进行Wireshark监控,过滤器为tcp.port == 60917 监听网卡lo (127.0.0.1)
compute.ly-compute1 ly-compute1:60482 【可选】可在ly-compute1主机上进行Wireshark监控,过滤器为tcp.port == 60482 监听网卡eth1 (10.0.0.31)
compute.ly-compute2 ly-compute2:37466 需要在ly-compute2主机上进行Wireshark监控,过滤器为tcp.port == 37466 监听网卡eth1 (10.0.0.32)




ly-compute1:60475 ly-compute1::nova-compute -(心跳消息,每10秒)-> ly-controller::nova-api
ly-compute1:60482 ly-controller::nova-scheduler -(创建、删除VM消息)-> ly-compute1::nova-compute


ly-compute2:37459 ly-compute2::nova-compute -(心跳消息,每10秒)-> ly-controller::nova-api
ly-compute2:37466 ly-controller::nova-scheduler -(创建、删除VM消息)-> ly-compute2::nova-compute




1. 整数消耗类的
IntFilter


CoreFilter
host有个VCPU资源,需要被VM消耗一个数值vcpus


RamFilter
host有个内存资源,需要被VM消耗一个数值memory_mb


DiskFilter
host有个硬盘资源,需要被VM消耗一个数值root_gb + ephemeral_gb + swap


NumInstancesFilter
host有个实例个数属性,看是否小于配置常数50


IoOpsFilter
host有个IO操作数属性num_io_ops,看是否小于配置常数8(builds/resizes/snaps/migrations)




2. 集合类的
SetFilter
map和item都可以看做是set,所以是set之间是否包含的问题


AvailabilityZoneFilter
host有一个availability_zone的set,看VM的需求zone是否在set里
host::set <-- VM::item


SameHostFilter
host有一个实例set,看VM的目标uuid是否在set里
host::set <-- VM::item


DifferentHostFilter
与SameHostFilter相反
!(host::set <-- VM::item)


ServerGroupAffinityFilter
VM有一个主机组set,看host的主机名是否在set里
host::item --> VM::set


ServerGroupAntiAffinityFilter
与ServerGroupAffinityFilter相反
!(host::item --> VM::set)


TypeAffinityFilter
host有一个实例类型set,set中必须只有一个元素,并且就是VM的实例类型
host::set->count == 1 && host::set <-- VM::item


ImagePropertiesFilter
host有一个所支持镜像属性set,看VM的镜像属性set是否包含在前者set里(architecture, hypervisor type, or virtual machine mode)
host::set <-- VM:set


ComputeCapabilitiesFilter
VM有一个所支持的额外需求特性map,host也有一个特性map,看VM的map是否全在host的map里
host::map <-- VM::map


3. 函数类的
FuncFilter


SimpleCIDRAffinityFilter
host的IP属性与VM的IP属性满足某个函数(同一网段)


TrustedFilter
host的name属性与VM的PCA属性满足某个函数(远程证实)


IsolatedHostsFilter
host的isolated属性与VM的isolated属性满足某个函数(同为true或者同为false)



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Casbin开源社区

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值