摘要:
段落2 段落3 class pythoncode: pass 阅读全文
摘要:
Ceph 准备工作 官方文档:http://docs.ceph.com/docs/master/rbd/rbd openstack/ 创建存储池 Create Ceph User ceph copy user.keyring to glance api node and cinder volume 阅读全文
摘要:
查看状态 1. 查看mon服务状态 2. 查看osd服务状态 查看pool的数据 查看osd状态 删除OSD 删除osd节点 设置 系统设置 1. 添加开机自启动 查看disk格式 导出disk 获得并修改CRUSH maps 阅读全文
摘要:
OSD node create cpeh user config sudo TTY config Monitor node 无密码登录 部署ceph osd node 擦净磁盘 准备OSD 如果这个不成功就自己格式化分区 激活osd add osd to curshmap docs:http://d 阅读全文
摘要:
deploy ceph mds node ceph mds status 阅读全文
摘要:
Install ceph docment: http://docs.ceph.com/docs/master/start/quick start preflight/ rhel centos Config system for RHEL/Centos Create Ceph Deploy User 阅读全文
摘要:
django url 多参数传递 传递多个参数的一般URL的情况是/instance id/action/ 阅读全文
摘要:
简单将日志打印到屏幕: import logging logging.debug('debug message') logging.info('info message') logging.warning('warning message') logging.error('error message') logging.critical('critical message'... 阅读全文
摘要:
信号量:允许同一时间几个线程访问公共数据 #!/usr/bin/python # coding:utf8 import threading import time p_list = [] num = 0 def run(n): semaphore.acquire() time.sleep(1) print 'this is %s num' % n semaph... 阅读全文
摘要:
测试代码: #!/usr/bin/python # coding:utf8 import threading import time num = 0 def run(n): print 'this is %s num' % n global num time.sleep(1) num += 1 for i in range(200): t =... 阅读全文
摘要:
install django pip install django create django project django-admin.py startproject mysite cd mysite install uwsgi (rhel 6.X: yum install uwsgi) pip install uwsgi create test.py # test.py d... 阅读全文
摘要:
Foreignkey : models表 class Host(models.Model): hostname = models.CharField(max_length=64) host_group = models.ForeignKey('Group') class Group(models.Model): name = models.CharField(... 阅读全文
摘要:
django 的templates 判断语法是采用jinjia2的语法 语法如下 for 循环 <ul> {% for athlete in athlete_list %} <li>{{ athlete.name }}</li> {% endfor %} </ul> if 判断 {% if athl 阅读全文
摘要:
django models的代码 class Group(models.Model): name = models.CharField(max_length=64) def __unicode__(self): return self.name class Host(models.Model): h 阅读全文
摘要:
如果需要独立运行脚本,并且还想使用django的环境模块的话需要设置: # config allow this is py invoke django models # config url Base_dir = "/".join(os.path.dirname(os.path.abspath(__file__)).split('/')[:-1]) sys.path.append(Base_d... 阅读全文
摘要:
在使用jQuery iCheck 插件的时候遇到了一个问题,就是当我们使用普通的js全选功能无效了。 $("#checkall").click( function(){ if(this.checked){ $("input[name='checkname']").each(function(){th 阅读全文