Comments (20)
我修改了实现方式,现在ansible这块儿执行结果都是通过websocket实时显示并且通过celery异步存储,存储函数我分别放在了task/utils/ans_module_websocket.py 和 task/utils/ans_playbook_websocket.py 中了
from ops.
我修改了实现方式,现在ansible这块儿执行结果都是通过websocket实时显示并且通过celery异步存储,存储函数我分别放在了task/utils/ans_module_websocket.py 和 task/utils/ans_playbook_websocket.py 中了
我这里playbook的日志好像没有写入,module_log没问题
[2019-02-14 08:50:14,583: INFO/MainProcess] Received task: task.tasks.playbook_record[9f572f2f-2f2b-4dbe-8709-7674ec3f47f7]
[2019-02-14 09:06:02,881: INFO/MainProcess] Received task: task.tasks.playbook_record[725f5fc1-1aa0-41e6-80bd-ca1801014365]
worker日志也显示有执行过,但是表里没发现记录
from ops.
你看任务管理模块里中的结果,里面有没有记录错误
from ops.
日志有了,还有一个问题,执行role的时候websocket连上秒断,没有显示执行过程,也没有执行过role, 但是执行单一playbook没问题
[2019/02/15 17:03:32] WebSocket HANDSHAKING /ws/ans_playbook_log/ [127.0.0.1:57534]
[2019/02/15 17:03:32] WebSocket CONNECT /ws/ans_playbook_log/ [127.0.0.1:57534]
[2019/02/15 17:03:32] WebSocket DISCONNECT /ws/ans_playbook_log/ [127.0.0.1:57534]
控制台显示是秒断的,然后日志表里面playbook_result是个空列表
from ops.
在web界面F12看一下console,是不是websocket报错了
from ops.
关于fort 禁用命令的部分我不是太明白,尝试禁用/bin/rm, 但还是可以删除
from ops.
禁用命令就是将命令加入到该用户的sudo文件中,给某个用户禁用了rm命令,是指该用户可以用rm命令删除所属用户是该用户的文件,但是不能使用rm删除其他用户的文件
from ops.
明白了,再请教一下主机组变量和主机变量不是一个配置吧?字典格式是{key1: vaule1, key2: vaule2 }这样传入吗?
from ops.
主机变量是为某个主机单独配置的变量,主机组变量是给指定组内所有主机配置的变量,字典格式没问题
from ops.
现在是能多组执行了对么?对了webshell好像不能输入数字
from ops.
可以多组执行了,webssh输入数字是有点儿问题,之前代码里的判断太笼统了,忘了改了。。
from ops.
我配了uwsgi.ini,但是执行uwsgi --ini ops-uwsgi.ini
的时候,控制台只返回这个
[uWSGI] getting INI configuration from ops-uwsgi.ini
然后就结束了,好像根本没起来
from ops.
uwsgi咋配置的?
from ops.
uwsgi咋配置的?
[uwsgi]
socket = /var/run/Ops.sock
chdir = /testops/Ops
wsgi-file = /testops/Ops/wsgi.py
processes = 2
enable-threads = true
threads = 2
stats = 127.0.0.1:9000
daemonize = /var/log/Ops.log
pidfile = /var/log/Ops.pid
http-timeout = 6000
py-autoreload = 1
vacuum = true
有问题吗
from ops.
wsgi-file 配置错了,改成
wsgi-file = Ops/wsgi.py
from ops.
wsgi-file 配置错了,改成
wsgi-file = Ops/wsgi.py
还是不行,直接加载配置之后就停了
[uWSGI] getting INI configuration from ops-uwsgi.ini
from ops.
看看/var/log/Ops.log有啥输出
from ops.
*** Starting uWSGI 2.0.17.1 (64bit) on [Thu Feb 28 14:26:17 2019] ***
compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-36) on 21 December 2018 03:46:48
os: Linux-3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017
nodename: test123
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 1
current working directory: /testops/Ops
writing pidfile to /var/log/Ops.pid
detected binary path: /usr/local/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
chdir() to /testops/Ops/
your processes number limit is 7168
your memory page size is 4096 bytes
detected max file descriptor number: 4096
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /var/run/Ops.sock fd 3
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
Python version: 3.6.2 (default, Nov 2 2018, 16:55:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
Python main interpreter initialized at 0x1373000
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 250128 bytes (244 KB) for 4 cores
*** Operational MODE: preforking+threaded ***
WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x1373000 pid: 101184 (default app)
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 101184)
spawned uWSGI worker 1 (pid: 101189, cores: 2)
spawned uWSGI worker 2 (pid: 101190, cores: 2)
*** Stats server enabled on 0.0.0.0:9191 fd: 20 ***
Python auto-reloader enabled
log显示pid是有的
from ops.
assets_terminal好像上传不了了,一直报红Are you sure to continue?
控制显示404
[2019/03/01 11:14:57] HTTP POST /assets/ssh/2%20/ 404 [0.03, 192.168.15.179:59769]
from ops.
log日志输出正常啊,说明uwsgi启动没问题。上传这块儿确实有问题,我正在写CI/CD功能,等写得差不多了再一块儿更新吧
from ops.
Related Issues (20)
- 兄嘚,makemigrations时经常会有字段设置为不为空但没有默认值 HOT 2
- 所有的日志都不显示,查看日志没有任何报错。 HOT 2
- mongo配置 HOT 2
- playbook格式问题 HOT 5
- 可以更新一下master的requirements.txt吗 HOT 2
- Style
- 可以解耦一下么
- 新增左侧菜单在右边区域不显示的问题 HOT 2
- ansible采集资产 HOT 5
- 资产采集的客户端 HOT 5
- windows rdp协议链接不上,有人成功了吗? HOT 6
- 任务管理-执行模块 中点击执行有相同任务执行的 HOT 2
- 开发环境 HOT 2
- 表结构设计 HOT 2
- 表缺失问题 HOT 5
- 关于playbook执行问题 HOT 8
- 关于playbook执行出现的bug HOT 3
- 登录后报错 HOT 1
- Ops/assets/models.py文件中的users.UserProfile是哪里来的啊?这个models.py中没有看到users表 HOT 1
- assetsintranet_ip_list.html模板没有 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ops.