forked from scylladb/scylla-cluster-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Linux agent on Scylla instances on Azure is disabled by default. scylladb/scylla-machine-image#627 Add cloud init script that enables it back for testing purposes.
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as published by | ||
# the Free Software Foundation; either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
# | ||
# See LICENSE for more details. | ||
# | ||
# Copyright (c) 2025 ScyllaDB | ||
from dataclasses import dataclass | ||
from textwrap import dedent | ||
|
||
from sdcm.sct_provision.user_data_objects import SctUserDataObject | ||
|
||
|
||
@dataclass | ||
class EnableWaLinuxAgent(SctUserDataObject): | ||
""" | ||
Scylla machines on Azure have WaLinuxAgent disabled by default. This script enables it. | ||
https://github.com/scylladb/scylla-machine-image/pull/627 | ||
""" | ||
@property | ||
def is_applicable(self) -> bool: | ||
return self.node_type == "scylla-db" and self.params.get("cluster_backend") == "azure" | ||
|
||
@property | ||
def script_to_run(self) -> str: | ||
return dedent(""" | ||
systemctl daemon-reload | ||
systemctl unmask walinuxagent | ||
systemctl enable walinuxagent | ||
systemctl start walinuxagent | ||
systemctl status walinuxagent --no-pager | ||
""") |