Skip to content
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

Fixes #15746: Make rtf use the system token #188

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions rtf
Expand Up @@ -672,8 +672,6 @@ class Platform:

host.run("sed -i s/set\ -e/set\ -xe/g /usr/local/bin/rudder-setup")
host.run("%s ALLOWEDNETWORK=%s/24 UNSUPPORTED=%s REPO_PREFIX=%s ; /usr/local/bin/rudder-setup setup-%s \"%s\" \"%s\"" %(proxy, allowedNetwork, unsupported, repoPrefix, rudderSetup, rudderVersion, server), live_output=True)
if 'server' in host.info['rudder-setup']:
host.run(vagrant_shared + "/scripts/create-token")

# Install the plugins
for host in self.hosts.values():
Expand Down Expand Up @@ -703,7 +701,7 @@ class Platform:
print(host.run("/opt/rudder/bin/rudder agent run"))
# Environment setup
rudder_url = host.get_url()
token = host.run('cat /root/rudder-token')
token = host.run('cat /var/rudder/run/api-token')
setenv(client_path, rudder_url, token)
for relay in relay_list:
# Accept the relay
Expand Down Expand Up @@ -901,7 +899,7 @@ class Platform:
for hostname, host in self.hosts.items():
if host.info['rudder-setup'] == "server":
rudder_url = host.get_url()
token = host.run('cat /root/rudder-token')
token = host.run('cat /var/rudder/run/api-token')
if rudder_url is None or token is None:
rudder_url = ''
token = ''
Expand Down
26 changes: 0 additions & 26 deletions scripts/create-token

This file was deleted.

2 changes: 1 addition & 1 deletion spec/tests/techniques/technique_rule.rb
Expand Up @@ -17,7 +17,7 @@

$directive_id += 1
# create directive
describe command($rudderCli + " directive create --json=" + directiveFile + " " + technique + " '" + directiveName + "' | jq '.directives[0].id'") do
describe command($rudderCli + " directive create --json=" + directiveFile + " " + technique + " " + directiveName) do
its(:stdout) { should match /^"[0-9a-f\-]+"$/ }
its(:exit_status) { should eq 0 }
it {
Expand Down
3 changes: 0 additions & 3 deletions vagrant.rb
Expand Up @@ -207,9 +207,6 @@ def provisioning_script(os, host_name, net, first_ip,
if setup == "ncf" then
command += "#{proxy} /usr/local/bin/ncf-setup setup-local \"#{ncf_version}\" \"#{cfengine_version}\"\n"
end
if setup == "server" then
command += sync_file_prefix + "/scripts/create-token\n"
end
if dev then
command += sync_file_prefix + "/scripts/dev.sh\n"
end
Expand Down