Re: AS config path only as a relative path?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: AS config path only as a relative path?

Brian Stansberry
I didn't see the JIRA, so I'm copying the dev list.

It was removed because the semantic was unclear. Users were expecting to
pass in an absolute file and then have the AS write back to that file.
We're not going to support writing outside the configuration/ dir and
never intended to.

I agree though that completely eliminating this was not the best
solution, as there's a good use case for it. Besides the testing issue,
some folks don't like the AS overwriting the config file in the first
place, so passing in a config file in a non-writable location is a
workaround solution for them.

My thoughts on this were to allow an --initial-server-config (for
standalone) and --initial-domain-config and --initial-host-config (for
domain). They would allow absolute paths. Their names and documentation
would indicate their contents are read when the process is first started
and thereafter are ignored.


On 2/13/12 4:28 AM, Ondřej Žižka wrote:

> I've created a jira for this task,
> let's discuss there.
>
> Thx,
> Ondra
>
>
> Ondřej Žižka píše v Po 13. 02. 2012 v 11:15 +0100:
>> Hi Brian,
>>
>> what was the reason to restrict AS config in sys prop to a relative path?
>>
>> In the testsuite, we would make use of absolute paths.
>> The reason is that we reuse the configs from docs/examples, and they
>> change quite often, so having them in resources would be hardly
>> maintainable.
>> However, docs/examples is not guaranteed to be always in the same
>> place: E.g. for EAP, or for RPM-based installation of EAP it might end
>> up in /var/docs or such.
>>
>> I would like to pass some property from maven to the tests, but that
>> results in absolute path.
>>
>> Thanks,
>> Ondra
>


--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: AS config path only as a relative path?

jtgreene
Administrator
I agree with the proposed solution.

On 2/13/12 10:30 AM, Brian Stansberry wrote:

> I didn't see the JIRA, so I'm copying the dev list.
>
> It was removed because the semantic was unclear. Users were expecting to
> pass in an absolute file and then have the AS write back to that file.
> We're not going to support writing outside the configuration/ dir and
> never intended to.
>
> I agree though that completely eliminating this was not the best
> solution, as there's a good use case for it. Besides the testing issue,
> some folks don't like the AS overwriting the config file in the first
> place, so passing in a config file in a non-writable location is a
> workaround solution for them.
>
> My thoughts on this were to allow an --initial-server-config (for
> standalone) and --initial-domain-config and --initial-host-config (for
> domain). They would allow absolute paths. Their names and documentation
> would indicate their contents are read when the process is first started
> and thereafter are ignored.
>
>
> On 2/13/12 4:28 AM, Ondřej Žižka wrote:
>> I've created a jira for this task,
>> let's discuss there.
>>
>> Thx,
>> Ondra
>>
>>
>> Ondřej Žižka píše v Po 13. 02. 2012 v 11:15 +0100:
>>> Hi Brian,
>>>
>>> what was the reason to restrict AS config in sys prop to a relative path?
>>>
>>> In the testsuite, we would make use of absolute paths.
>>> The reason is that we reuse the configs from docs/examples, and they
>>> change quite often, so having them in resources would be hardly
>>> maintainable.
>>> However, docs/examples is not guaranteed to be always in the same
>>> place: E.g. for EAP, or for RPM-based installation of EAP it might end
>>> up in /var/docs or such.
>>>
>>> I would like to pass some property from maven to the tests, but that
>>> results in absolute path.
>>>
>>> Thanks,
>>> Ondra
>>
>
>


--
Jason T. Greene
JBoss AS Lead / EAP Platform Architect
JBoss, a division of Red Hat
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: AS config path only as a relative path?

Ondrej Zizka
In reply to this post by Brian Stansberry
Oops, forgot to paste the link.
https://issues.jboss.org/browse/AS7-3726  Pass the path to docs/examples to the tests.
(I worded it rather not to expect current behavior to change.)

Ondra


Brian Stansberry píše v Po 13. 02. 2012 v 10:30 -0600:
I didn't see the JIRA, so I'm copying the dev list.

It was removed because the semantic was unclear. Users were expecting to 
pass in an absolute file and then have the AS write back to that file. 
We're not going to support writing outside the configuration/ dir and 
never intended to.

I agree though that completely eliminating this was not the best 
solution, as there's a good use case for it. Besides the testing issue, 
some folks don't like the AS overwriting the config file in the first 
place, so passing in a config file in a non-writable location is a 
workaround solution for them.

My thoughts on this were to allow an --initial-server-config (for 
standalone) and --initial-domain-config and --initial-host-config (for 
domain). They would allow absolute paths. Their names and documentation 
would indicate their contents are read when the process is first started 
and thereafter are ignored.


On 2/13/12 4:28 AM, Ondřej Žižka wrote:
> I've created a jira for this task,
> let's discuss there.
>
> Thx,
> Ondra
>
>
> Ondřej Žižka píše v Po 13. 02. 2012 v 11:15 +0100:
>> Hi Brian,
>>
>> what was the reason to restrict AS config in sys prop to a relative path?
>>
>> In the testsuite, we would make use of absolute paths.
>> The reason is that we reuse the configs from docs/examples, and they
>> change quite often, so having them in resources would be hardly
>> maintainable.
>> However, docs/examples is not guaranteed to be always in the same
>> place: E.g. for EAP, or for RPM-based installation of EAP it might end
>> up in /var/docs or such.
>>
>> I would like to pass some property from maven to the tests, but that
>> results in absolute path.
>>
>> Thanks,
>> Ondra
>




_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: AS config path only as a relative path?

Ondrej Zizka
In reply to this post by Brian Stansberry
Brian Stansberry píše v Po 13. 02. 2012 v 10:30 -0600:

...
My thoughts on this were to allow an --initial-server-config (for 
standalone) and --initial-domain-config and --initial-host-config (for 
domain). They would allow absolute paths. Their names and documentation 
would indicate their contents are read when the process is first started 
and thereafter are ignored.
Nice, that would help in the testsuite scenario.

O.

On 2/13/12 4:28 AM, Ondřej Žižka wrote:
> I've created a jira for this task,
> let's discuss there.
>
> Thx,
> Ondra
>
>
> Ondřej Žižka píše v Po 13. 02. 2012 v 11:15 +0100:
>> Hi Brian,
>>
>> what was the reason to restrict AS config in sys prop to a relative path?
>>
>> In the testsuite, we would make use of absolute paths.
>> The reason is that we reuse the configs from docs/examples, and they
>> change quite often, so having them in resources would be hardly
>> maintainable.
>> However, docs/examples is not guaranteed to be always in the same
>> place: E.g. for EAP, or for RPM-based installation of EAP it might end
>> up in /var/docs or such.
>>
>> I would like to pass some property from maven to the tests, but that
>> results in absolute path.
>>
>> Thanks,
>> Ondra
>




_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Reloading server config from custom file? /// Re: AS config path only as a relative path?

Ondrej Zizka
In reply to this post by Brian Stansberry
Once talking about testability issues:


The AS 7 testsuite is going to contain many configurations.
Currently we solve that by a combination of:
* multiple Maven modules or Surefire executions
* AS management API to change the config and get it back to original state.

Both ways are toilsome, complicated, error-prone and hard to maintain.
The estimation is that the number of configurations for EAP final will be in tens.

Ideal solution for this would be to let Arquillian to reload the server with a different config file.
It would work the same as restoring config snapshots[1] via mgmt API, only taking a parameter of which file should be loaded.
So the tests would look like:

@TestCase @ASConfigFile("standalone-foo.xml")
class TestsToBeRunOnFooTestCase { ... }

@TestCase @ASConfigFile("standalone-bar.xml")
class TestsToBeRunOnBarTestCase { ... }

Similar to what is in https://issues.jboss.org/browse/ARQ-746 , only the server would not need to restart.

Can such feature appear in 7.1.1?


Thanks,
Ondra


[1]  https://docs.jboss.org/author/display/AS71/Configuration+file+history






Brian Stansberry píše v Po 13. 02. 2012 v 10:30 -0600:
I didn't see the JIRA, so I'm copying the dev list.

It was removed because the semantic was unclear. Users were expecting to 
pass in an absolute file and then have the AS write back to that file. 
We're not going to support writing outside the configuration/ dir and 
never intended to.

I agree though that completely eliminating this was not the best 
solution, as there's a good use case for it. Besides the testing issue, 
some folks don't like the AS overwriting the config file in the first 
place, so passing in a config file in a non-writable location is a 
workaround solution for them.

My thoughts on this were to allow an --initial-server-config (for 
standalone) and --initial-domain-config and --initial-host-config (for 
domain). They would allow absolute paths. Their names and documentation 
would indicate their contents are read when the process is first started 
and thereafter are ignored.


On 2/13/12 4:28 AM, Ondřej Žižka wrote:
> I've created a jira for this task,
> let's discuss there.
>
> Thx,
> Ondra
>
>
> Ondřej Žižka píše v Po 13. 02. 2012 v 11:15 +0100:
>> Hi Brian,
>>
>> what was the reason to restrict AS config in sys prop to a relative path?
>>
>> In the testsuite, we would make use of absolute paths.
>> The reason is that we reuse the configs from docs/examples, and they
>> change quite often, so having them in resources would be hardly
>> maintainable.
>> However, docs/examples is not guaranteed to be always in the same
>> place: E.g. for EAP, or for RPM-based installation of EAP it might end
>> up in /var/docs or such.
>>
>> I would like to pass some property from maven to the tests, but that
>> results in absolute path.
>>
>> Thanks,
>> Ondra
>




_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev