Skip to content

Commit a601449

Browse files
committed
Retrieve operator & HO log via http api endpoint, without journald
1 parent c23dfd2 commit a601449

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

frontend/debian/cuttlefish-orchestration.cuttlefish-host_orchestrator.init

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ USER="httpcvd"
4141
RUN_DIR="/run/cuttlefish"
4242
ORCHESTRATOR_BIN="/usr/lib/cuttlefish-common/bin/host_orchestrator"
4343
ORCHESTRATOR_PIDFILE="${RUN_DIR}"/host_orchestrator.pid
44+
ORCHESTRATOR_LOGFILE="${RUN_DIR}"/host_orchestrator.log
4445
ASSET_DIR="/usr/share/cuttlefish-common/operator"
4546

4647
set_config_expr() {
@@ -102,6 +103,7 @@ start_orchestrator() {
102103
--chdir "${ASSET_DIR}" \
103104
--background --no-close \
104105
--make-pidfile \
106+
--output ${ORCHESTRATOR_LOGFILE} \
105107
--exec "${ORCHESTRATOR_BIN}" -- "${args[@]}"
106108
}
107109

frontend/debian/cuttlefish-user.cuttlefish-operator.init

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ RUN_DIR="/run/cuttlefish"
3939
ASSET_DIR="/usr/share/cuttlefish-common/operator"
4040
DAEMON="/usr/lib/cuttlefish-common/bin/operator"
4141
PIDFILE="${RUN_DIR}"/operator.pid
42+
LOGFILE="${RUN_DIR}"/operator.log
4243

4344
gen_cert() {
4445
operator_tls_cert_dir=${operator_tls_cert_dir:-/etc/cuttlefish-common/operator/cert}
@@ -92,6 +93,7 @@ start() {
9293
--chdir "${ASSET_DIR}" \
9394
--background --no-close \
9495
--make-pidfile \
96+
--output ${LOGFILE} \
9597
--exec "${DAEMON}" -- "${args[@]}"
9698
}
9799

frontend/host/packages/cuttlefish-orchestration/etc/nginx/sites-available/cuttlefish-orchestration.conf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ server {
2929
ssl_certificate /etc/cuttlefish-orchestration/ssl/cert/cert.pem;
3030
ssl_certificate_key /etc/cuttlefish-orchestration/ssl/cert/key.pem;
3131

32-
location /hostlogs/cuttlefish-operator.service {
33-
rewrite /hostlogs/cuttlefish-operator.service /entries?_SYSTEMD_UNIT=cuttlefish-operator.service break;
34-
proxy_pass http://0.0.0.0:19531;
32+
location = /hostlogs/cuttlefish-operator.service {
33+
alias /run/cuttlefish/operator.log;
34+
default_type "text/plain";
3535
}
36-
location /hostlogs/cuttlefish-host_orchestrator.service {
37-
rewrite /hostlogs/cuttlefish-host_orchestrator.service /entries?_SYSTEMD_UNIT=cuttlefish-host_orchestrator.service break;
38-
proxy_pass http://0.0.0.0:19531;
36+
location = /hostlogs/cuttlefish-host_orchestrator.service {
37+
alias /run/cuttlefish/host_orchestrator.log;
38+
default_type "text/plain";
3939
}
4040
location /hostlogs/kernel {
4141
rewrite /hostlogs/kernel /entries?_TRANSPORT=kernel break;

0 commit comments

Comments
 (0)