mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-04-26 06:27:50 +02:00
use vrt
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
{% from 'allowed_states.map.jinja' import allowed_states %}
|
||||
{% if sls in allowed_states %}
|
||||
{% if 'hvn' in salt['pillar.get']('features', []) %}
|
||||
{% if 'vrt' in salt['pillar.get']('features', []) %}
|
||||
{% from 'salt/map.jinja' import SALTVERSION %}
|
||||
{% set HYPERVISORS = salt['pillar.get']('hypervisor:nodes', {} ) %}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
{% from 'allowed_states.map.jinja' import allowed_states %}
|
||||
{% if sls.split('.')[:2]|join('.') in allowed_states %}
|
||||
{% if 'hvn' in salt['pillar.get']('features', []) %}
|
||||
{% if 'vrt' in salt['pillar.get']('features', []) %}
|
||||
reactor_config_hypervisor:
|
||||
file.managed:
|
||||
- name: /etc/salt/master.d/reactor_hypervisor.conf
|
||||
|
||||
@@ -63,7 +63,7 @@ State Files:
|
||||
- <vm_name>.error: Error state with detailed message
|
||||
|
||||
Notes:
|
||||
- Requires 'hvn' feature license
|
||||
- Requires 'vrt' feature license
|
||||
- Uses hypervisor's sosmodel grain for hardware capabilities
|
||||
- Hardware allocation based on model-specific configurations
|
||||
- All created files maintain socore ownership
|
||||
@@ -80,7 +80,7 @@ Description:
|
||||
- Lock remains until clean shutdown or error
|
||||
|
||||
2. License Validation
|
||||
- Verifies 'hvn' feature is licensed
|
||||
- Verifies 'vrt' feature is licensed
|
||||
- Prevents operation if license is invalid
|
||||
|
||||
3. Configuration Processing
|
||||
@@ -567,7 +567,7 @@ def mark_invalid_hardware(hypervisor_path: str, vm_name: str, config: dict, erro
|
||||
log.error("Failed to create invalid hardware file: %s", str(e))
|
||||
raise
|
||||
|
||||
def validate_hvn_license() -> bool:
|
||||
def validate_vrt_license() -> bool:
|
||||
"""Check if the license file exists and contains required values."""
|
||||
if not os.path.exists(LICENSE_PATH):
|
||||
log.error("License file not found at %s", LICENSE_PATH)
|
||||
@@ -588,7 +588,7 @@ def validate_hvn_license() -> bool:
|
||||
log.error("No license_id found in license file")
|
||||
return False
|
||||
|
||||
if 'hvn' not in features:
|
||||
if 'vrt' not in features:
|
||||
log.error("Hypervisor nodes are a feature supported only for customers with a valid license.\n"
|
||||
"Contact Security Onion Solutions, LLC via our website at https://securityonionsolutions.com\n"
|
||||
"for more information about purchasing a license to enable this feature.")
|
||||
@@ -889,7 +889,7 @@ def start(interval: int = DEFAULT_INTERVAL,
|
||||
"""
|
||||
log.info("Starting virtual node manager engine")
|
||||
|
||||
if not validate_hvn_license():
|
||||
if not validate_vrt_license():
|
||||
return
|
||||
|
||||
# Attempt to acquire lock
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
include:
|
||||
- salt.minion
|
||||
{% if 'hvn' in salt['pillar.get']('features', []) %}
|
||||
{% if 'vrt' in salt['pillar.get']('features', []) %}
|
||||
- salt.cloud
|
||||
- salt.cloud.reactor_config_hypervisor
|
||||
|
||||
@@ -48,11 +48,11 @@ pillarWatch_engine:
|
||||
- name: /etc/salt/engines/pillarWatch.py
|
||||
- source: salt://salt/engines/master/pillarWatch.py
|
||||
|
||||
{% if 'hvn' in salt['pillar.get']('features', []) %}
|
||||
hvn_engine_config:
|
||||
{% if 'vrt' in salt['pillar.get']('features', []) %}
|
||||
vrt_engine_config:
|
||||
file.managed:
|
||||
- name: /etc/salt/master.d/hvn_engine.conf
|
||||
- source: salt://salt/files/hvn_engine.conf
|
||||
- name: /etc/salt/master.d/vrt_engine.conf
|
||||
- source: salt://salt/files/vrt_engine.conf
|
||||
- watch_in:
|
||||
- service: salt_master_service
|
||||
|
||||
|
||||
Reference in New Issue
Block a user