From da7922b861b200f19cca80e81240085f81143dee Mon Sep 17 00:00:00 2001 From: Carla Ourofino <ourofino@tecgraf.puc-rio.br> Date: Mon, 23 Mar 2020 18:36:09 -0300 Subject: [PATCH] =?UTF-8?q?Evita=20configura=C3=A7=C3=A3o=20m=C3=BAltipla?= =?UTF-8?q?=20dentro=20de=20configura=C3=A7=C3=A3o=20m=C3=BAltipla.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [SOMA-3827][SOMA-4041] --- sga/configuration.lua | 4 +++- sgad-multi.cfg.example | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 sgad-multi.cfg.example diff --git a/sga/configuration.lua b/sga/configuration.lua index a53061e..b6562dc 100644 --- a/sga/configuration.lua +++ b/sga/configuration.lua @@ -28,7 +28,9 @@ function configuration.read(filename, sga_name) -- TODO: O que fazer nesse caso? Avisar que foi ignorado? config.sga_name = nil end - config, err = configuration.get(config.sga[sga_name], filename, config) + local config_data = config.sga[sga_name] + config.sga = nil + config, err = configuration.get(config_data, filename, config) if not config then return nil, "["..sga_name.."] "..err end diff --git a/sgad-multi.cfg.example b/sgad-multi.cfg.example new file mode 100644 index 0000000..e364c4c --- /dev/null +++ b/sgad-multi.cfg.example @@ -0,0 +1,37 @@ +csbase_server = "http://localhost:40409" +platform = "Linux26g4" +-- sgad_bind_addr = "127.0.0.1" +sgad_host = "localhost" +sgad_port = 12345 +--sga_name = "chuva" +status_interval_s = 10 +exec_polling_interval_s = 5 +register_retry_s = 3 +project_root_dir = os.getenv("HOME").."/test/sga-environment/csgrid/projects" +algorithm_root_dir = os.getenv("HOME").."/test/sga-environment/csgrid/algorithms" +runtime_data_dir = (os.getenv("TMPDIR") or "/tmp").."/sgad" +sandbox_root_dir = "/tmp/sgad/sandbox" +driver = "sga.driver.posix" +resources = { + "java", + "lua" +} +extra_config = { + csbase_transfer_name = "ssh-datatransfer", + csbase_csfs_root_dir = "/tmp/csfs_sandbox", + ssh_host = "localhost", + ssh_port = 22, + ssh_user_name = "csgrid", + ssh_private_key_path = "/home/csgrid/.ssh/foo_id_rsa" +} + +sga.first = [[ +platform = "Linux44_64" +sandbox_root_dir = "/tmp/sgad/sandbox-first-chuva" +]] + +sga.second = [[ +sga_name = "second" +platform = "Linux64e5" +sandbox_root_dir = "/tmp/sgad/sandbox-second-chuva" +]] -- GitLab