Changeset c2dbca8
- Timestamp:
- Jul 22, 2009 9:55:54 AM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
- Children:
- 4b362df
- Parents:
- 79b6596
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/experiment_control.py
r79b6596 rc2dbca8 532 532 return True 533 533 534 535 def create_config_tree(self, src_dir, dest_dir, script): 536 """ 537 Append commands to script that will create the directory hierarchy on 538 the remote federant. 539 """ 540 541 if os.path.isdir(src_dir): 542 print >>script, "mkdir -p %s" % dest_dir 543 print >>script, "chmod 770 %s" % dest_dir 544 545 for f in os.listdir(src_dir): 546 if os.path.isdir(f): 547 self.create_config_tree("%s/%s" % (src_dir, f), 548 "%s/%s" % (dest_dir, f), script) 549 else: 550 self.log.debug("[create_config_tree]: Not a directory: %s" \ 551 % src_dir) 552 534 553 def ship_configs(self, host, user, src_dir, dest_dir): 535 554 """ 536 555 Copy federant-specific configuration files to the federant. 537 556 """ 538 if not self.ssh_cmd(user, host, "mkdir -p %s" % dest_dir):539 return False540 if not self.ssh_cmd(user, host, "chmod 770 %s" % dest_dir):541 return False542 543 557 for f in os.listdir(src_dir): 544 558 if os.path.isdir(f): … … 571 585 dev_null = open("/dev/null", "a") 572 586 except IOError, e: 573 self.log.error("[ start_segment]: can't open /dev/null: %s" %e)587 self.log.error("[get_state]: can't open /dev/null: %s" %e) 574 588 575 589 if self.debug: … … 670 684 print >>scriptfile, "mkdir -p %s" % d 671 685 print >>scriptfile, 'mkdir -p %s' % proj_dir 686 self.create_config_tree("%s/%s" % (tmpdir, tb), proj_dir, scriptfile) 687 if os.path.isdir("%s/tarfiles" % tmpdir): 688 self.create_config_tree("%s/tarfiles" % tmpdir, tarfiles_dir, 689 scriptfile) 690 if os.path.isdir("%s/rpms" % tmpdir): 691 self.create_config_tree("%s/rpms" % tmpdir, rpms_dir, 692 scriptfile) 672 693 print >>scriptfile, "rm -f %s" % scriptbase 673 694 scriptfile.close()
Note: See TracChangeset
for help on using the changeset viewer.