-
Notifications
You must be signed in to change notification settings - Fork 2
Add Design Apps elements #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
TorisutanKholwes
wants to merge
2
commits into
opensvc:main
Choose a base branch
from
TorisutanKholwes:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,106 @@ | ||
| # References | ||
|
|
||
| A reference is a marker in the value of a configuration keyword, replaced during evaluation. | ||
|
|
||
| A reference is formatted as `{<expression>}`. | ||
|
|
||
| A reference can contain arithmetic evaluations. | ||
|
|
||
| An arithmetic evaluation can contain references. | ||
|
|
||
| References can be used to: | ||
|
|
||
| * Abstract changing parts of a configuration, so this configuration can be used as a template | ||
| Example: The object name, object id, the devices that hosts the data | ||
|
|
||
| * Factorize information, so changing it is easier and safer | ||
| Example: A project name used to format the name of different resources (volume group, filesystem path, ...) | ||
|
|
||
| * Contextualize part of a configuration with information known to the agent | ||
| Example: The cluster nodes, cluster dns ip addresses, ... | ||
|
|
||
| ## Intra-Configuration References | ||
|
|
||
| The reference format is `{[<section>.]<option>}`, where | ||
|
|
||
| * `<section>` is a configuration file section name | ||
| * `<option>` is the option name in the pointed section. | ||
|
|
||
| If `<section>` is omitted, the referencing keyword's section is implicitly used if the reference can be found locally, or the `DEFAULT` section is implicitly used. | ||
|
|
||
| ## Intra-Section References | ||
|
|
||
| These references can be used inside a configuration section, and their evaluated value depends on the section. | ||
|
|
||
| | Reference | Description | Node Configuration File | Service Configuration File | | ||
| |---------------|---------------------------------------------------------------------------|-------------------------|----------------------------| | ||
| | `{rid}` | The name of the section the reference is under | No | Yes | | ||
| | `{rindex}` | The part after the dash of the name of the section the reference is under | No | Yes | | ||
| | `{<keyword>}` | Reference to another keyword's value inside the same section | Yes | Yes | | ||
|
|
||
| ## Hard Coded References | ||
|
|
||
| | Reference | Description | Node Configuration File | Service Configuration File | | ||
| |-----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|----------------------------| | ||
| | `{nodename}` | The running node fqdn | Yes | Yes | | ||
| | `{short_nodename}` | The running node base name (without domain) | Yes | Yes | | ||
| | `{#nodes}` | Number of nodes | No | Yes | | ||
| | `{namespace}` | The name of the hosting namespace | No | Yes | | ||
| | `{kind}` | The object kind, ie "svc", "vol", "sec", "cfg", "ccfg" | No | Yes | | ||
| | `{name}` | The object name | No | Yes | | ||
| | `{path}` | The object path, ie `<namespace>/<kind>/<name>` | No | Yes | | ||
| | `{short_name}` | The object base name (name with domain suffix stripped) | No | Yes | | ||
| | `{fqdn}` | The object fully qualified name, as registered in the cluster DNS, ie `<name>.<namespace>.<kind>.<clustername>` | No | Yes | | ||
| | `{scaler_name}` | The scaler name (because `{name}` resolves to the slice name) | No | Yes | | ||
| | `{scaler_short_name}` | The scaler base name (name with domain suffix stripped) | No | Yes | | ||
| | `{id}` | The object id | No | Yes | | ||
| | `{safe://<id>}` | Substitute the reference with the content of the safe file identified by `<id>`. Usually passwords or private keys. The content is cached locally so the collector dependency is loose. | Yes | Yes | | ||
| | `{clustername}` | The `cluster.name` node keyword value | Yes | Yes | | ||
| | `{clusterid}` | The `cluster.id` node keyword value | Yes | Yes | | ||
| | `{clusternodes}` | The `cluster.nodes` node keyword value | Yes | Yes | | ||
| | `{clusterdrpnodes}` | The `cluster.drpnodes` node keyword value | Yes | Yes | | ||
| | `{dns}` | The `cluster.dns` node keyword value (ip adressses) | Yes | Yes | | ||
| | `{dnsnodes}` | The `cluster.dns` node keyword value (resolved names) | Yes | Yes | | ||
| | `{dnsuxsock}` | The path to the dns thread unix socket | Yes | Yes | | ||
| | `{dnsuxsockd}` | The path to the directory hosting the dns thread unix socket | Yes | Yes | | ||
| | `{collector_api}` | The uri of the collector Rest API | Yes | Yes | | ||
| | `{nodemgr}` | The full path the the om node executable} | Yes | Yes | | ||
| | `{svcmgr}` | The full path the the svcmgr executable | Yes | Yes | | ||
| | `{etc}` | The agent `etc/` directory path: `/etc/opensvc/` for agents installed through the packages, `/opt/opensvc/etc/` for an agent installed via git pull in `/opt` | Yes | Yes | | ||
| | `{var}` | The agent var/ directory path `/var/lib/opensvc/` for agents installed through the packages, `/opt/opensvc/var/` for an agent installed via git pull in `/opt` | Yes | Yes | | ||
| | `{initd}` | The object init directory path. ex: `/etc/opensvc/etc/<name>.d` | Yes | Yes | | ||
| | `{private_var}` | The object private directory under `{var}` | Yes | Yes | | ||
| | `{<rid>.exposed_devs}` | The whitespace-separated list of devpaths exposed by `<rid>` | No | Yes | | ||
| | `{<rid>.exposed_devs[<n>]}` | The <n>-th element of the list of devpaths exposed by `<rid>` | No | Yes | | ||
| | `{<rid>.exposed_devs[#]}` | The length of the list of devpaths exposed by `<rid>` | No | Yes | | ||
|
|
||
| Deprecated references: | ||
|
|
||
| | Reference | Description | Node Configuration File | Service Configuration File | | ||
| |-------------------|------------------------------|-------------------------|----------------------------| | ||
| | `{svcname}` | Deprecated by `{name}` | No | Yes | | ||
| | `{svcpath}` | Deprecated by `{path}` | No | Yes | | ||
| | `{short_svcname}` | Deprecated by `{short_name}` | No | Yes | | ||
|
|
||
| ## References and `env` Section | ||
|
|
||
| The `env` section can be used to store arbitrary factorized information to make available as references in other parts of the configuration. | ||
|
|
||
| Example: | ||
|
|
||
| ```ini | ||
| [disk#0] | ||
| name = {id} | ||
| pvs = {env.devs} | ||
|
|
||
| [env] | ||
| devs = /dev/vdb | ||
| ``` | ||
|
|
||
| These values can be overridden when creating a new object from this configuration file or template, | ||
|
|
||
| * Interactively | ||
| `om <path> create --config <template> --interactive` | ||
|
|
||
| * In the commandline | ||
| `om <path> create --config <template> --env devs=/dev/vdc` | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -98,7 +98,7 @@ om daemon dns dump | |
| #### Test the unix socket served by opensvc for the PowerDNS server | ||
|
|
||
| ``` | ||
| echo '{"method": "list", "parameters": {"zonename": "cluster1."}}' | sudo socat - unix://var/lib/opensvc/dns/pdns.sock | jq | ||
| curl -H "Content-Type: application/json" --unix-socket /var/lib/opensvc/lsnr/http.sock http://localhost/api/node/name/localhost/daemon/dns/dump | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. drop this change please... |
||
| ``` | ||
|
|
||
| ### Verify the DNS server | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop all mentions of arithmetic expressions.
support for arithmetic expressions is dropped from om3.