Add ipmitool as explicit dependency in service file and deployment script
This commit is contained in:
parent
a7163f8ac2
commit
b5b615abe6
|
|
@ -11,6 +11,10 @@ SERVICE_NAME="ipmi-controller"
|
|||
echo "=== Deploying IPMI Controller to Production ==="
|
||||
echo "Target: $PROD_HOST"
|
||||
|
||||
# Install system dependencies
|
||||
echo "Installing system dependencies..."
|
||||
ssh $PROD_USER@$PROD_HOST "sudo apt update -qq && sudo apt install -y ipmitool python3-pip 2>/dev/null | tail -3"
|
||||
|
||||
# Create remote directory
|
||||
echo "Creating remote directory..."
|
||||
ssh $PROD_USER@$PROD_HOST "sudo mkdir -p $PROD_DIR && sudo chown $PROD_USER:$PROD_USER $PROD_DIR"
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
[Unit]
|
||||
Description=IPMI Controller - Advanced Fan Control
|
||||
After=network.target
|
||||
Requires=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/ipmi-controller
|
||||
ExecStartPre=/bin/sh -c 'command -v ipmitool >/dev/null 2>&1 || { echo "ipmitool is required but not installed"; exit 1; }'
|
||||
ExecStart=/usr/bin/python3 /opt/ipmi-controller/web_server.py
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
|
|
|||
68
server.log
68
server.log
|
|
@ -715,3 +715,71 @@ Traceback (most recent call last):
|
|||
const data = {{
|
||||
^^^^^^^
|
||||
NameError: name 'padding' is not defined
|
||||
2026-02-20 23:03:08,820 - fan_controller - INFO - Fan 0xff speed set to 15%
|
||||
2026-02-20 23:03:08,820 - fan_controller - INFO - All fans set to 15% (Temp 40.0°C)
|
||||
2026-02-20 23:03:26,001 - fan_controller - INFO - Fan 0xff speed set to 14%
|
||||
2026-02-20 23:03:26,001 - fan_controller - INFO - All fans set to 14% (Temp 38.0°C)
|
||||
2026-02-20 23:03:58,639 - fan_controller - INFO - Fan 0xff speed set to 15%
|
||||
2026-02-20 23:03:58,639 - fan_controller - INFO - All fans set to 15% (Temp 40.0°C)
|
||||
2026-02-20 23:04:14,022 - fan_controller - INFO - Fan 0xff speed set to 14%
|
||||
2026-02-20 23:04:14,022 - fan_controller - INFO - All fans set to 14% (Temp 39.0°C)
|
||||
INFO: 192.168.5.30:49653 - "GET / HTTP/1.1" 500 Internal Server Error
|
||||
ERROR: Exception in ASGI application
|
||||
Traceback (most recent call last):
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/uvicorn/protocols/http/httptools_impl.py", line 419, in run_asgi
|
||||
result = await app( # type: ignore[func-returns-value]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
|
||||
return await self.app(scope, receive, send)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
|
||||
await super().__call__(scope, receive, send)
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/starlette/applications.py", line 123, in __call__
|
||||
await self.middleware_stack(scope, receive, send)
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__
|
||||
raise exc
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__
|
||||
await self.app(scope, receive, _send)
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/starlette/middleware/cors.py", line 83, in __call__
|
||||
await self.app(scope, receive, send)
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
|
||||
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
|
||||
raise exc
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
||||
await app(scope, receive, sender)
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/starlette/routing.py", line 762, in __call__
|
||||
await self.middleware_stack(scope, receive, send)
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/starlette/routing.py", line 782, in app
|
||||
await route.handle(scope, receive, send)
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/starlette/routing.py", line 297, in handle
|
||||
await self.app(scope, receive, send)
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/starlette/routing.py", line 77, in app
|
||||
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
|
||||
raise exc
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
||||
await app(scope, receive, sender)
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/starlette/routing.py", line 72, in app
|
||||
response = await func(request)
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/fastapi/routing.py", line 299, in app
|
||||
raise e
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/fastapi/routing.py", line 294, in app
|
||||
raw_response = await run_endpoint_function(
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/home/devmatrix/.local/lib/python3.12/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
|
||||
return await dependant.call(**values)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/home/devmatrix/projects/fan-controller-v2/web_server.py", line 1592, in root
|
||||
</form>
|
||||
|
||||
File "/home/devmatrix/projects/fan-controller-v2/web_server.py", line 1424, in get_html
|
||||
const data = {{
|
||||
^^^^^^^
|
||||
NameError: name 'padding' is not defined
|
||||
2026-02-20 23:06:01,019 - fan_controller - WARNING - IPMI command failed:
|
||||
INFO: Shutting down
|
||||
INFO: Waiting for application shutdown.
|
||||
INFO: Application shutdown complete.
|
||||
INFO: Finished server process [105401]
|
||||
|
|
|
|||
Loading…
Reference in New Issue