Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,640,587
Community Members
 
Community Events
196
Community Groups

What is the purpose of folders created in /tmp by Bamboo

Jan Swaelens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Sep 04, 2012

Hello,

We are on Bamboo 4.2 (same behavior was noticed on earlier versions too) and notice a bunch of folders being created by Bamboo in the /tmp folder of our server instance.

These folders are named [Project Key]-[Plan Key] and seem to contain no files.

We are wondering what the purpose of those files is and why they seem to be empty. Out IT staff would also like it very much to get rid of them (as they seem to contain no files).

Also, is there something to configure in terms of an alternate location?

Thanks for your insights

2 answers

1 accepted

0 votes
Answer accepted
Jan Swaelens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 09, 2012

Those folders are created because they are passed to java processes as value for 'java.io.tmpdir'. By default the plan key is added as a sub folder to the default system setting for 'java.io.tmpdir'.

It is possible to specify an alternate folder by means of the Java system property 'bamboo.build.parent.java.io.tmpdir' (which is what we are doing now to have the temp folders created on our data partition instead of the os partition).

Far better to launch the agent pointing at a more suitable tmp location, than to require end users to define it in their build plans.  You can do this by editing the wrapper.conf and adding in the following line:

wrapper.java.additional.n=-Djava.io.tmpdir=/my/alternate/path/tmp

where n doesn't clash with similar lines in the same file.

Thanks Richard, I had to revisit this because some plugin we are using is using that tmp location more than before.

Using the wrapper configuration file works but it is quite the hassle to apply this to all our agents. Any chance this option can be passed using a Java system variable which can be passed during agent startup, we have scripts for that which can easily pass the right one automatically.

tx

jan

We manage this by using SaltStack to provision all our agents, but you could just as easily use Puppet, Chef or Ansible.

That said, it doesn't completely solve the problem; we still have issues with NPM and Apache Spark related tasks, which leave hundreds of directories/files in /tmp, that are never cleaned up.

Like examplesbdev example likes this

I want to run salt commands from my bitbucket_pipeline.yml to some Servers hosted in AWS cloud. Could you please provide me some code examples which will help me to give the initial start?

1 vote
Cameron Ferguson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Sep 04, 2012

Sounds like to me that's where your builds are happening....

If you have the miscellaneous options for your jobs set to, "Clean Working Directory after build" then it would contain no files...

How are you launching the bamboo agent? Are you specifying "-Dbamboo.home=/bamboo/dir" when launching the agent jar file?

Jan Swaelens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Sep 06, 2012

We have bamboo.home set to an alternate location, the builds are happening there. I think I'm gonna deep dive in the code to see where those folders are coming from :-)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events